1. Learn
  2. /
  3. Courses
  4. /
  5. Anomaly Detection in Python

Exercise

Creating a DateTimeIndex

Having a DatetimeIndex is helpful for several reasons. First, you can use brackets notation to choose arbitrary time periods or write only a line of code to create line plots.

Practice these operations on the apple stocks dataset, which has been loaded with Date as a datetime column.

Instructions

100 XP
  • Set the Date column as the apple DataFrame's index.
  • Create a red lineplot of the Open column of Apple stocks from the beginning of July 2008 to the 9th of December 2013.