class_docstr: Namespace for datetime related expressions.
docstr: Extract ordinal day from underlying Date representation.
  
  Applies to Date and Datetime columns.
  
  Returns the day of year starting from 1.
  The return value ranges from 1 to 366. (The last day of year differs by years.)
  
  Returns
  -------
  Expr
      Expression of data type :class:`Int16`.
  
  See Also
  --------
  weekday
  day
  
  Examples
  --------
  >>> from datetime import date
  >>> df = pl.DataFrame(
  ...     {
  ...         "date": pl.date_range(
  ...             date(2001, 12, 22), date(2001, 12, 25), eager=True
  ...         )
  ...     }
  ... )
  >>> df.with_columns(
  ...     pl.col("date").dt.weekday().alias("weekday"),
  ...     pl.col("date").dt.day().alias("day_of_month"),
  ...     pl.col("date").dt.ordinal_day().alias("day_of_year"),
  ... )
  shape: (4, 4)
  ┌────────────┬─────────┬──────────────┬─────────────┐
  │ date       ┆ weekday ┆ day_of_month ┆ day_of_year │
  │ ---        ┆ ---     ┆ ---          ┆ ---         │
  │ date       ┆ i8      ┆ i8           ┆ i16         │
  ╞════════════╪═════════╪══════════════╪═════════════╡
  │ 2001-12-22 ┆ 6       ┆ 22           ┆ 356         │
  │ 2001-12-23 ┆ 7       ┆ 23           ┆ 357         │
  │ 2001-12-24 ┆ 1       ┆ 24           ┆ 358         │
  │ 2001-12-25 ┆ 2       ┆ 25           ┆ 359         │
  └────────────┴─────────┴──────────────┴─────────────┘
docstr_tok: ["Extract","ordinal","day","from","underlying","Date","representation",".","Applies","to","Date","and","Datetime","columns",".","Returns","the","day","of","year","starting","from","1",".","The","return","value","ranges","from","1","to","366",".","(","The","last","day","of","year","differs","by","years",".",")","Returns","--","--","--","-","Expr","Expression","of","data","type",":","class",":","`","Int16","`",".","See","Also","--","--","--","--","weekday","day","Examples","--","--","--","--",">",">",">","from","datetime","import","date",">",">",">","df","=","pl.DataFrame","(","...","{","...","``","date","''",":","pl.date_range","(","...","date","(","2001",",","12",",","22",")",",","date","(","2001",",","12",",","25",")",",","eager=True","...",")","...","}","...",")",">",">",">","df.with_columns","(","...","pl.col","(","``","date","''",")",".dt.weekday","(",")",".alias","(","``","weekday","''",")",",","...","pl.col","(","``","date","''",")",".dt.day","(",")",".alias","(","``","day_of_month","''",")",",","...","pl.col","(","``","date","''",")",".dt.ordinal_day","(",")",".alias","(","``","day_of_year","''",")",",","...",")","shape",":","(","4",",","4",")","\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510","\u2502","date","\u2506","weekday","\u2506","day_of_month","\u2506","day_of_year","\u2502","\u2502","--","-","\u2506","--","-","\u2506","--","-","\u2506","--","-","\u2502","\u2502","date","\u2506","i8","\u2506","i8","\u2506","i16","\u2502","\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561","\u2502","2001-12-22","\u2506","6","\u2506","22","\u2506","356","\u2502","\u2502","2001-12-23","\u2506","7","\u2506","23","\u2506","357","\u2502","\u2502","2001-12-24","\u2506","1","\u2506","24","\u2506","358","\u2502","\u2502","2001-12-25","\u2506","2","\u2506","25","\u2506","359","\u2502","\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"]
code: def ordinal_day(self) -> Expr:
      """
      Extract ordinal day from underlying Date representation.
  
      Applies to Date and Datetime columns.
  
      Returns the day of year starting from 1.
      The return value ranges from 1 to 366. (The last day of year differs by years.)
  
      Returns
      -------
      Expr
          Expression of data type :class:`Int16`.
  
      See Also
      --------
      weekday
      day
  
      Examples
      --------
      >>> from datetime import date
      >>> df = pl.DataFrame(
      ...     {
      ...         "date": pl.date_range(
      ...             date(2001, 12, 22), date(2001, 12, 25), eager=True
      ...         )
      ...     }
      ... )
      >>> df.with_columns(
      ...     pl.col("date").dt.weekday().alias("weekday"),
      ...     pl.col("date").dt.day().alias("day_of_month"),
      ...     pl.col("date").dt.ordinal_day().alias("day_of_year"),
      ... )
      shape: (4, 4)
      ┌────────────┬─────────┬──────────────┬─────────────┐
      │ date       ┆ weekday ┆ day_of_month ┆ day_of_year │
      │ ---        ┆ ---     ┆ ---          ┆ ---         │
      │ date       ┆ i8      ┆ i8           ┆ i16         │
      ╞════════════╪═════════╪══════════════╪═════════════╡
      │ 2001-12-22 ┆ 6       ┆ 22           ┆ 356         │
      │ 2001-12-23 ┆ 7       ┆ 23           ┆ 357         │
      │ 2001-12-24 ┆ 1       ┆ 24           ┆ 358         │
      │ 2001-12-25 ┆ 2       ┆ 25           ┆ 359         │
      └────────────┴─────────┴──────────────┴─────────────┘
  
      """
      return wrap_expr(self._pyexpr.dt_ordinal_day())
  
imports: from __future__ import annotations
  import datetime
  from typing import TYPE_CHECKING
  import polars._reexport
  from polars import functions
  from polars.datatypes import DTYPE_TEMPORAL_UNITS, Date, Int32
  from polars.utils._parse_expr_input import parse_as_expression
  from polars.utils._wrap import wrap_expr
  from polars.utils.convert import _timedelta_to_pl_duration
  from polars.utils.deprecation import deprecate_renamed_function, deprecate_saturating, issue_deprecation_warning, rename_use_earliest_to_ambiguous
label_desc: Use image node_id 15 for calling the ExprDateTimeNameSpace obj's underlying member method code with example usage: obj.ordinal_day() and returns: wrap_expr