furniture = furniture.groupby('Order Date')['Sales'].sum().reset_index()
print(furniture.head())
Output:
Order Date Sales
0 2014-01-06 2573.820
1 2014-01-07 76.728
2 2014-01-10 51.940
3 2014-01-11 9.940
4 2014-01-13 879.939
when i want to have month wise mean of sales.so added
y = furniture['Sales'].resample('MS').mean()
output:
TypeError: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'RangeIndex'
I can understand my Order Date column is not in Timestamp Formate .I dont know how to convert it.
Any idea pl?