I have a pandas dataframe that has two datetime64 columns and one timedelta64 column that is the difference between the two columns. I'm trying to plot a histogram of the timedelta column to visualize the time differences between the two events.
However, just using df['time_delta']
results in:
TypeError: ufunc add cannot use operands with types dtype('<m8[ns]') and dtype('float64')
Trying to convert the timedelta column to : float--> df2 = df1['time_delta'].astype(float)
results in:
TypeError: cannot astype a timedelta from [timedelta64[ns]] to [float64]
How would one create a histogram of pandas timedelta data?