草庐IT

DateTimeIndex

全部标签

python - 将 Pandas 时区感知 DateTimeIndex 转换为天真的时间戳,但在特定时区

您可以使用函数tz_localize使Timestamp或DateTimeIndex时区感知,但您如何做相反的事情:如何将时区感知Timestamp转换为幼稚时间戳,同时保留其时区?一个例子:In[82]:t=pd.date_range(start="2013-05-1812:00:00",periods=10,freq='s',tz="Europe/Brussels")In[83]:tOut[83]:[2013-05-1812:00:00,...,2013-05-1812:00:09]Length:10,Freq:S,Timezone:Europe/Brussels我可以通过将时区设