以分钟为单位转换时间增量列



我试图在网络中以分钟为单位转换timedelta格式的一列,我知道我需要使用first total.seconds((,但我可以使用以下列:

Orden['Tiempo_xx_entre']=Orden['Lag_fecha_hora']-Orden['FECHA_HORA']
Orden['sec']= Orden['Tiempo_xx_entre'].total_seconds()

但这个错误是:

AttributeError: 'Series' object has no attribute 'total_seconds'

你能帮我在几分钟内转换Tiempo_xx_entre列吗?

我使用dt来解决如下问题:

Orden['Tiempo_xx_entre']=((Orden['FECHA_HORA']Orden['Lag_fecha_hora']).dt.total_seconds())/ 60