📜  熊猫索引到日期时间 - Python 代码示例

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

代码示例2
import pandas as pd
df = pd.Dataframe(data)
df.index = pd.DatetimeIndex(data=df.index, tz='US/Eastern') # naive--> aware
df.index = pd.DatetimeIndex(df.index.tz_convert('US/Pacific')) # aware--> aware
df