我有一个熊猫数据栏,它有两个datetime64列和一个timedelta64列,这是这两个列之间的区别。我试图绘制一个时间增量列的直方图,以可视化这两个事件之间的时间差。但是,仅使用df['time_delta']就会导致:TypeError: ufunc add cannot use operands with types dtype('<m8[ns]') and dtype<
如何使用这种数据管理数据序列,使之不出现任何错误。pd.Series(data2)a, b = np.polyfit(date, ser2, 1)UFuncTypeError: ufunc'add' cannot use operands with types dtype('<M8[ns]') and dtype('float64'