我有一个DataFrame:enter image description here
我想在本地时间显示“ TimeStamps”,但不运行。
time.localtime(data_user['TimeStamps'].astype(int))
错误:
TypeError: cannot convert the series to <class 'int'>
我该怎么做?
使用箭头包
from datetime import datetime
import arrow
now = datetime.utcnow()
print(arrow.get(now).to('local').format())
# 2020-04-25 15:55:31+01:00