Changing A value on Time Column with Python/Pandas
If need only 00
hours solution is simplier/ faster with Series.dt.floor
:
task_df["TARGET_END_DATE"] = task_df["TARGET_END_DATE"].dt.floor('d')
If need some hour, e.g. 10:00
add it:
task_df["TARGET_END_DATE"] = (task_df["TARGET_END_DATE"].dt.floor('d') +
pd.Timedelta(10, 'hour'))
You can use:
task_df["TARGET_END_DATE"].dt.normalize()