课程评价 (0)

请对课程作出评价:
0/300

学员评价

暂无精选评价
6分钟

PeriodIndex

如果将一个Period序列作为索引,则该索引就是PeriodIndex类型。其各位置的值为Period对象。

  pd.PeriodIndex(data=None, ordinal=None, freq=None, start=None, end=None, 
  periods=None, copy=False, name=None, tz=None, dtype=None, **kwargs)
  • data:一个array-like对象,给出了各个时间段
  • copy:一个布尔值,如果为True 则拷贝基础数据
  • freq:一个字符串或者period对象,给出了频率
  • start:一个period-like,指定了起始时间段。如果data=None,则使用它来生成时间段
  • periods:一个整数(大于0),指定生成多少个时间段。如果data=None,则使用它来生成时间段
  • end:一个period-like,指定了结束时间段。如果data=Noneperiods=None,则使用它来生成时间段
  • year/month/quarter/day/hour/minute/second:一个整数、array或者Series 。通过它们可以组装出一个Period序列。
  • tz: 一个字符串,指定了时区。如果非空,则返回的是localized DatetimeIndex
  • name:指定了Index的名字