Use Series.dt.time
in DataFrame.apply
for processing all columns:
df = df.apply(lambda x: x.dt.time)
But times are pure python objects, so not easy processing in pandas.
Possible solution should be convert times to timedeltas:
df = df.apply(lambda x: pd.to_timedelta(x.dt.strtime('%H:%M:%S')))
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments