Я пытаюсь создать таблицу частот из некоторых дат с помощью панд TimeGrouper, но я получаю следующую ошибку
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]
вход:
t.groupby(pd.core.resample.TimeGrouper('H').count().plot(kind='bar'))
выход:
Error: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'RangeIndex'