I'm trying to create frequency table from some dates by pandas TimeGrouper but I receive the following error
input:
t = pd.to_datetime(t)
t = pd.Series(t)
t
output:
0 2019-04-10 10:49:00
1 2019-04-10 10:49:00
2 2019-04-10 10:49:00
3 2019-04-10 10:49:00
4 2019-04-10 10:49:00
5 2019-04-10 10:48:00
6 2019-04-10 10:48:00
7 2019-04-10 10:48:00
8 2019-04-10 10:48:00
9 2019-04-10 10:48:00
Name: tweet.created_at, dtype: datetime64[ns]
input:
t.groupby(pd.core.resample.TimeGrouper('H').count().plot(kind='bar'))
output:
Error: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'RangeIndex'