Session Ready
Exercise

Dates (I)

You will often come across timeseries data during your Data Science journey. It is important you know how to parse them correctly and Pandas provides convenient functions for you to deal with them. If you have a date column that is in the form of a string, you can easily convert it to a datetime format using the pd.to_datetime() function. You need to specify the format argument that specifies in which format the dates exist. If the dates are in the month/day/year format, you would use:

pd.to_datetime(df['date_column_as_string'], format='%m/%d/%Y')

Having dates in this format is far more desirable as you will see in the next exercise.

Instructions 1/2
undefined XP
  • 1
  • 2

Import the country_timeseries.csv dataset and assign it to ebola and inspect the type of 'Date' column.