pandas的PeriodIndex的用法

版权声明:本文为博主原创文章,未经博主允许不得转载。 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’>类型

猜你喜欢

转载自blog.csdn.net/XUEER88888888888888/article/details/86532846