I have a use case where:
Data is of the form: Col1, Col2, Col3 and Timestamp.
Now, I just want to get the counts of the rows vs Timestamp Bins.
i.e.
groupby
pd.Grouper
# optionally, if needed # df['Timestamp'] = pd.to_datetime(df['Timestamp'], errors='coerce') df.groupby(pd.Grouper(key='Timestamp', freq='30min')).count()
resample
df.set_index('Timestamp').resample('30min').count()