I am using pandas and I want to make a time series plot. I have this dataframe, and I want to plot the date on the x-axis with the number of units on the y-axis. I am assuming I need to convert my date object to a datetime before I can make this plot.
df1_99.dtypes
date object
store_nbr int64
units int64
tavg int64
preciptotal float64
dtype: object
df1_99
date store_nbr units tavg preciptotal
101885 2014-10-13 1 2 49 0.00
101996 2014-10-14 1 1 67 0.00
102107 2014-10-15 1 0 70 0.00
102218 2014-10-16 1 0 67 0.87
102329 2014-10-17 1 3 65 0.01
to_datetime
e.g.df['date'] = pd.to_datetime(df['date'])
– EdChum