Reputation: 3065
I have a dataframe where I have created a column called newTime
which is based on the time
from a dateTime
column called InvoiceDate
.
df['newTime'] = [d.time() for d in df['InvoiceDate']]
In this column is a list of times using the format HH:mm:ss
How do I group these times into hour periods for a full 24 hours and then get a count for each period?
So the dataframe column looks like:
And the expected output looks like the following (or similar):
Upvotes: 1
Views: 111