pandas - count by multiple columns as dataframe

Viewed 8

I have a dataframe that contains two columns - Date and Time. This has multiple entries for each date and time combination.

enter image description here

I want to get counts for each combination as a dataframe

I tried this..but I am not too sure as to whether this is giving me what I want. SPecifically, I am suspicious about ['Time'] folowing the groupby call. Also, I am having trouble convertign the result to dataframe. I tried reset_index() and that doesnt seem to work

enter image description here

0 Answers
Related