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
From the course: Python for Data Visualization (2019)
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Introduction to pandas52s
-
Create sample data3m 50s
-
Load sample data2m 17s
-
Basic operations1m 57s
-
Slicing4m 12s
-
Filtering5m 39s
-
Renaming and deleting columns3m 16s
-
Aggregate functions2m 39s
-
Identifying missing data3m 41s
-
Removing or filling in missing data5m 3s
-
Convert pandas DataFrames to NumPy arrays or dictionaries1m 15s
-
Export pandas DataFrames to CSV and Excel files1m 28s
-
-
-
-