用法:
property DatetimeProperties.dayofyear
一年中的某一天,非闰年为 1-365,闰年为 1-366。
例子:
>>> import pandas as pd >>> import cudf >>> datetime_series = cudf.Series(pd.date_range('2016-12-31', ... '2017-01-08', freq='D')) >>> datetime_series 0 2016-12-31 1 2017-01-01 2 2017-01-02 3 2017-01-03 4 2017-01-04 5 2017-01-05 6 2017-01-06 7 2017-01-07 8 2017-01-08 dtype: datetime64[ns] >>> datetime_series.dt.dayofyear 0 366 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 dtype: int16
相关用法
- Python cudf.core.series.DatetimeProperties.dayofweek用法及代码示例
- Python cudf.core.series.DatetimeProperties.day用法及代码示例
- Python cudf.core.series.DatetimeProperties.day_of_year用法及代码示例
- Python cudf.core.series.DatetimeProperties.month用法及代码示例
- Python cudf.core.series.DatetimeProperties.year用法及代码示例
- Python cudf.core.series.DatetimeProperties.second用法及代码示例
- Python cudf.core.series.DatetimeProperties.isocalendar用法及代码示例
- Python cudf.core.series.DatetimeProperties.hour用法及代码示例
- Python cudf.core.series.DatetimeProperties.ceil用法及代码示例
- Python cudf.core.series.DatetimeProperties.floor用法及代码示例
- Python cudf.core.series.DatetimeProperties.quarter用法及代码示例
- Python cudf.core.series.DatetimeProperties.weekday用法及代码示例
- Python cudf.core.series.DatetimeProperties.minute用法及代码示例
- Python cudf.core.series.DatetimeProperties.round用法及代码示例
- Python cudf.core.series.DatetimeProperties.strftime用法及代码示例
- Python cudf.core.series.TimedeltaProperties.microseconds用法及代码示例
- Python cudf.core.series.TimedeltaProperties.components用法及代码示例
- Python cudf.core.series.TimedeltaProperties.days用法及代码示例
- Python cudf.core.series.TimedeltaProperties.seconds用法及代码示例
- Python cudf.core.series.TimedeltaProperties.nanoseconds用法及代码示例
注:本文由纯净天空筛选整理自rapids.ai大神的英文原创作品 cudf.core.series.DatetimeProperties.dayofyear。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。