boolean indexing datetime object 7c converting string to datetime object

Solutions on MaxInterview for boolean indexing datetime object 7c converting string to datetime object by the best coders in the world

showing results for - "boolean indexing datetime object 7c converting string to datetime object"
Arianna
23 Aug 2016
1#convert col fromt string to dt 
2df['date_time'] = pd.to_datetime(df['date_time'])
3
4#boolean indexing on column 
5day = i_94.copy()[(df['date_time'].dt.hour >= time_val) & (df['date_time'].dt.hour < time_val)]
6print(day.shape)
7
similar questions