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

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