Issue
I have succesfully filtered my dataframe with this code:
df.set_index('Time')
df.index=pd.to_datetime(df.index)
df.between_time('08:00', '17:00')
Now, the df only contains the data in between the specified time frame. Now I want to count the values of the column "location", if this condition applies. How do I achieve that?
Solution
Try:
df.between_time('08:00', '17:00')['location'].nunique()
Answered By - Learning is a mess
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.