當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python cudf.core.series.DatetimeProperties.month用法及代碼示例

用法:

property DatetimeProperties.month

月份為一月=1,十二月=12。

例子

>>> import pandas as pd
>>> import cudf
>>> datetime_series = cudf.Series(pd.date_range("2000-01-01",
...         periods=3, freq="M"))
>>> datetime_series
0   2000-01-31
1   2000-02-29
2   2000-03-31
dtype: datetime64[ns]
>>> datetime_series.dt.month
0    1
1    2
2    3
dtype: int16

相關用法


注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cudf.core.series.DatetimeProperties.month。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。