convert date time to date pandas
df['date_column'] = pd.to_datetime(df['datetime_column']).dt.date
convert date time to date pandas
df['date_column'] = pd.to_datetime(df['datetime_column']).dt.date
pandas query on datetime
from time import datetime
date_start = datetime(year_start, month_start, day_start)
date_end = datetime(year_end, month_end, day_end)
# df is your pandas dataframe
sel = df[(df['timestamp'] >= date_start) &
(df['timestamp'] <= date_end)]
# tested with
# python 3.9.4
# pandas 1.3.2
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us