我正在嘗試將嗅探時(shí)間轉(zhuǎn)換為秒數(shù)。我已經(jīng)在Python Pandas DataFrame中查看了將timedelta64[ns]列轉(zhuǎn)換為秒,但是該解決方案不起作用。我想也許熊貓線可能有錯(cuò)。print(sniffTime)print(type(sniffTime))輸出:821693000 nanoseconds<class 'numpy.timedelta64'>錯(cuò)誤AttributeError: 'numpy.timedelta64' object has no attribute 'total_seconds'在線:df['PerSec']=df['PerSec'].div(sniffTime.total_seconds())
屬性錯(cuò)誤:“numpy.timedelta64”對(duì)象沒有屬性“total_seconds”與熊貓
夢(mèng)里花落0921
2022-08-16 10:11:59
