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

Apple Stock

Introduction:

We are going to use Apple's stock price.

Step 1. Import the necessary libraries

Step 2. Import the dataset from this address

Step 3. Assign it to a variable apple

Step 4. Check out the type of the columns

Step 5. Transform the Date column as a datetime type

Step 6. Set the date as the index

Step 7. Is there any duplicate dates?

Step 8. Ops...it seems the index is from the most recent date. Make the first entry the oldest date.

Step 9. Get the last business day of each month

Step 10. What is the difference in days between the first day and the oldest

Step 11. How many months in the data we have?

Step 12. Plot the 'Adj Close' value. Set the size of the figure to 13.5 x 9 inches

BONUS: Create your own question and answer it.