📌  相关文章
📜  从 unix 时间戳到 datetime pandas - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:49.596000             🧑  作者: 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')