I have object data in df in the 'czas_oczekiwania' column
when grouping, I want to have the sum of times for individual days
ph3=ph1.groupby([pd.to_datetime(ph1['data']).dt.to_period('D'), 'typ'])['czas_oczekiwania'].sum()
i think you need datetime module and time converting with apply_dataframe
import datetime
result = (
ph3
.dt
.components[["hours","minutes","seconds"]]
.apply(lambda x: datetime.time(hour=x[0], minute=x[1], second=x[2]), axis=1)
)
result