Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

converting pandas._libs.tslibs.timedeltas.Timedelta to days

# Convert TimeDelta column (5 days etc.) into an integer column (5)
import numpy as np
df.timeDelta = (df.timeDelta / np.timedelta64(1,'D')).astype(int)
 
PREVIOUS NEXT
Tagged: #converting #days
ADD COMMENT
Topic
Name
1+2 =