modin.pandas.DatetimeIndex.year¶ property DatetimeIndex.year: Index[source]¶ The year of the datetime. Return type: An Index with the year of the datetime. Examples CopyExpand>>> idx = pd.date_range("2000-01-01", periods=3, freq="YE") >>> idx DatetimeIndex(['2000-12-31', '2001-12-31', '2002-12-31'], dtype='datetime64[ns]', freq=None) >>> idx.year Index([2000, 2001, 2002], dtype='int64') Show lessSee moreScroll to top