class_docstr: Series.dt namespace.
class_docstr_tok: ["Series.dt","namespace","."]
docstr: Extract the year from the underlying date representation.
  
  Applies to Date and Datetime columns.
  
  Returns the year number in the calendar date.
  
  Returns
  -------
  Series
      Series of data type :class:`Int32`.
  
  Examples
  --------
  >>> from datetime import date
  >>> s = pl.Series("date", [date(2001, 1, 1), date(2002, 1, 1)])
  >>> s.dt.year()
  shape: (2,)
  Series: 'date' [i32]
  [
          2001
          2002
  ]
code: def year(self) -> Series:
      """
      Extract the year from the underlying date representation.
  
      Applies to Date and Datetime columns.
  
      Returns the year number in the calendar date.
  
      Returns
      -------
      Series
          Series of data type :class:`Int32`.
  
      Examples
      --------
      >>> from datetime import date
      >>> s = pl.Series("date", [date(2001, 1, 1), date(2002, 1, 1)])
      >>> s.dt.year()
      shape: (2,)
      Series: 'date' [i32]
      [
              2001
              2002
      ]
  
      """
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from polars.datatypes import Date
  from polars.series.utils import expr_dispatch
  from polars.utils._wrap import wrap_s
  from polars.utils.convert import _to_python_date, _to_python_datetime
  from polars.utils.deprecation import deprecate_renamed_function
label_desc: Use image node_id 9 for calling the DateTimeNameSpace obj's underlying member method code with example usage: obj.year() without return types