How to convert a timedelta column in a Pandas DataFrame to a days column in Python

A timedelta holds information about a length of time to nanosecond accuracy. Converting a column of timedeltas in a pandas.DataFrame to days updates the column with the number of days in each timedelta.

Solution for How to convert a timedelta column in a Pandas DataFrame to a days column in Python : You can use pandas.Series.dt.days to convert a pandas.DataFrame timedelta column to days Call Series.dt.days on the timedelta Series to convert it into days.


how-to-convert-a-timedelta-column-in-a-pandas-dataframe-to-a-days-column-in-python