My pandas dataframe is in two time dimensions, the date
and the period
the data fall in. Making a pivot table out of it further explains the structure. But how to plot a line chart along the two time dimensions
raw_data = {'period': ['2016-05-26', '2016-05-26', '2016-05-26', '2016-05-27', '2016-05-27'],
'date': ['2016-05-26', '2016-05-27', '2016-05-28', '2016-05-26', '2016-05-27'],
'mid_score': [25, 94, 57, 62, 70],
'post_score': [5, 43, 23, 23, 51]}
df = pd.DataFrame(raw_data, columns = ['period', 'date', 'mid_score', 'post_score'])
df
df.groupby(['period','date']).sum()
What is the best way to plot this kind of grouped data, is it possible to have it like this kind of line chart?