Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
guipsamora
GitHub Repository: guipsamora/pandas_exercises
Path: blob/master/09_Time_Series/Investor_Flow_of_Funds_US/Exercises.ipynb
613 views
Kernel: Python 2

Investor - Flow of Funds - US

Introduction:

Special thanks to: https://github.com/rgrp for sharing the dataset.

Step 1. Import the necessary libraries

Step 2. Import the dataset from this address.

Step 3. Assign it to a variable called

Step 4. What is the frequency of the dataset?

Step 5. Set the column Date as the index.

Step 6. What is the type of the index?

Step 7. Set the index to a DatetimeIndex type

Step 8. Change the frequency to monthly, sum the values and assign it to monthly.

Step 9. You will notice that it filled the dataFrame with months that don't have any data with NaN. Let's drop these rows.

Step 10. Good, now we have the monthly data. Now change the frequency to year.

BONUS: Create your own question and answer it.