📌  相关文章
📜  将 unix 时间戳转换为日期时间 python pandas - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:12.931000             🧑  作者: Mango

代码示例3
# convert unix timestamp to datetime UTC
df['datetime'] = df['_ts'].map(lambda x: pendulum.from_timestamp(x)) 
df = df.set_index('datetime')
# convert timezone from UTC to GMT+7
df.index = df.index.tz_convert('Asia/Bangkok')