polars.internals.series.DateTimeNameSpace.year

DateTimeNameSpace.year() polars.internals.series.Series

Extract the year from the underlying date representation. Can be performed on Date and Datetime.

Returns the year number in the calendar date.

Returns
Year as Int32