版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/XUEER88888888888888/article/details/86532846
PeriodIndex
periods = pd.PeriodIndex(year=data["year"],month=data["month"],day=data["day"],hour=data["hour"],freq="H")
原始的数据:
时间转换后的数据:
<class ‘pandas.core.indexes.period.PeriodIndex’>类型