So I thought this should have been a simpler task but I could not find it. I have a pandas dataframe as follows
Company Id DateTime col1 col2 col3 col4 col5 col6
0 25502921 2018-08-16 10:23:36 0 175.000 0.0 0.0 0.0 0
1 25502921 2018-08-16 10:33:55 0 155.557 0.0 0.0 0.0 0
2 25502921 2018-08-16 10:43:55 0 153.615 0.0 0.0 0.0 0
type(df['DateTime'][0]) outputs pandas._libs.tslibs.timestamps.Timestamp
How can i subset the dataframe based on a date?
df_tmp = df[df['DateTime'].dt.date=='16-08-2018'] does not seem to work nor does df_tmp = df[df['DateTime']=='16-08-2018']
What are the other intuitive methods i can try?