From the course: Python for Data Visualization (2019)

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

Create sample data

Create sample data

- [Instructor] In order to create visualizations, you first need to have data to work with. So in this video, I'll teach you how to create sample data in the form of a car loan table. So what we have here is a car loan of $34,690 with a 7.02% interest rate over 60 months. There are multiple approaches to structure your data into a form acceptable by Pandas DataFrame. One approach is by using a nested list. Where in the first row, we have the first month of our car payment. So we have one for the month. We have our starting balance. We have a repayment, which is $687.23. We have a repayment, which is $687.23. We have how much of that repayment is going toward interest. We have how much of that payment is going toward the principle of the loan. And then after a payment, we have how much is our new balance. We have the term of the loan, which is how many months we're going to be paying this loan for in total. We have the interest rate for the loan, and we also…

Contents