§
    q-PhqÀ ã                  ó4  — d dl mZ d dlZd dlmZ d dlmZ d dl	m
Z d dlmZ d dlmZmZ d dlmZmZ d dlmZ d d	lmZ d d
lmZ d dlmZmZmZ er:d dlZd dlm Z  d dl	m!Z! d dl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z) ej*        dk    rd dl+mZ nd dl,mZ  G d„ d¦  «        Z-dS )é    )ÚannotationsN)ÚTYPE_CHECKING)Ú	functions)Úparse_as_duration_string)Údeprecate_nonkeyword_argumentsÚ
deprecated)Úparse_into_expressionÚparse_into_list_of_expressions)Úunstable)Úqualified_type_name)Ú	wrap_expr)ÚDTYPE_TEMPORAL_UNITSÚDateÚInt32)ÚIterable)ÚExpr)Ú	AmbiguousÚEpochTimeUnitÚIntoExprÚIntoExprColumnÚNonExistentÚRollÚTimeUnit)é   é   )r   c            	      óv  — e Zd ZdZdZdid„Z e¦   «          edd	gd
¬¦  «        	 	 	 djdkd„¦   «         ¦   «         Zdld„Z	dmd„Z
dddddddddœdnd(„Zdodpd.„Zdqdrd1„Zdsd3„Zdtd4„Zdtd5„Zdtd6„Z e¦   «         ddd7œdud8„¦   «         Zdtd9„Zdtd:„Zdtd;„Zdtd<„Zdtd=„Zdtd>„Zdtd?„Zdtd@„ZdtdA„ZdtdB„Z edC¦  «        dtdD„¦   «         ZdtdE„ZdtdF„Z dGdHœdvdK„Z!dtdL„Z"dtdM„Z#dtdN„Z$dodwdP„Z%dodxdQ„Z& edR¦  «        dxdS„¦   «         Z'dxdT„Z(dydV„Z)dddWœdzdZ„Z*dtd[„Z+dtd\„Z,dtd]„Z-dtd^„Z.dtd_„Z/dtd`„Z0dtda„Z1d{dd„Z2dtde„Z3dtdf„Z4dtdg„Z5dtdh„Z6dS )|ÚExprDateTimeNameSpacez+Namespace for datetime related expressions.ÚdtÚexprr   ÚreturnÚNonec                ó   — |j         | _         d S ©N)Ú_pyexpr)Úselfr   s     úT/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/polars/expr/datetime.pyÚ__init__zExprDateTimeNameSpace.__init__*   s   € Ø”|ˆŒˆˆó    r%   Únz1.12.0)Úallowed_argsÚversion©TTTTTFF© Úraiseúint | IntoExprÚ	week_maskúIterable[bool]ÚholidaysúIterable[dt.date]Úrollr   c                óº   ‡— t          |¦  «        }t          j        ddd¦  «        Št          | j                             ||ˆfd„|D ¦   «         |¦  «        ¦  «        S )u{  
        Offset by `n` business days.

        .. warning::
            This functionality is considered **unstable**. It may be changed
            at any point without it being considered a breaking change.

        .. versionchanged:: 1.12.0
            Parameters after `n` should now be passed as keyword arguments.

        Parameters
        ----------
        n
            Number of business days to offset by. Can be a single number of an
            expression.
        week_mask
            Which days of the week to count. The default is Monday to Friday.
            If you wanted to count only Monday to Thursday, you would pass
            `(True, True, True, True, False, False, False)`.
        holidays
            Holidays to exclude from the count. The Python package
            `python-holidays <https://github.com/vacanza/python-holidays>`_
            may come in handy here. You can install it with ``pip install holidays``,
            and then, to get all Dutch holidays for years 2020-2024:

            .. code-block:: python

                import holidays

                my_holidays = holidays.country_holidays("NL", years=range(2020, 2025))

            and pass `holidays=my_holidays` when you call `add_business_days`.
        roll
            What to do when the start date lands on a non-business day. Options are:

            - `'raise'`: raise an error
            - `'forward'`: move to the next business day
            - `'backward'`: move to the previous business day

        Returns
        -------
        Expr
            Data type is preserved.

        Examples
        --------
        >>> from datetime import date
        >>> df = pl.DataFrame({"start": [date(2020, 1, 1), date(2020, 1, 2)]})
        >>> df.with_columns(result=pl.col("start").dt.add_business_days(5))
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ start      â”† result     â”‚
        â”‚ ---        â”† ---        â”‚
        â”‚ date       â”† date       â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-01 â”† 2020-01-08 â”‚
        â”‚ 2020-01-02 â”† 2020-01-09 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        You can pass a custom weekend - for example, if you only take Sunday off:

        >>> week_mask = (True, True, True, True, True, True, False)
        >>> df.with_columns(
        ...     result=pl.col("start").dt.add_business_days(5, week_mask=week_mask)
        ... )
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ start      â”† result     â”‚
        â”‚ ---        â”† ---        â”‚
        â”‚ date       â”† date       â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-01 â”† 2020-01-07 â”‚
        â”‚ 2020-01-02 â”† 2020-01-08 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        You can also pass a list of holidays:

        >>> from datetime import date
        >>> holidays = [date(2020, 1, 3), date(2020, 1, 6)]
        >>> df.with_columns(
        ...     result=pl.col("start").dt.add_business_days(5, holidays=holidays)
        ... )
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ start      â”† result     â”‚
        â”‚ ---        â”† ---        â”‚
        â”‚ date       â”† date       â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-01 â”† 2020-01-10 â”‚
        â”‚ 2020-01-02 â”† 2020-01-13 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        Roll all dates forwards to the next business day:

        >>> df = pl.DataFrame({"start": [date(2020, 1, 5), date(2020, 1, 6)]})
        >>> df.with_columns(
        ...     rolled_forwards=pl.col("start").dt.add_business_days(0, roll="forward")
        ... )
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ start      â”† rolled_forwards â”‚
        â”‚ ---        â”† ---             â”‚
        â”‚ date       â”† date            â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-05 â”† 2020-01-06      â”‚
        â”‚ 2020-01-06 â”† 2020-01-06      â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        é²  é   c                ó$   •— g | ]}|‰z
  j         ‘ŒS r-   ©Údays©Ú.0ÚholidayÚ
unix_epochs     €r&   ú
<listcomp>z;ExprDateTimeNameSpace.add_business_days.<locals>.<listcomp>¨   ó!   ø€ ÐEÐEÐE°'˜JÑ&Ô,ÐEÐEÐEr(   )r	   r   Údater   r$   Údt_add_business_days)r%   r)   r0   r2   r4   Ún_pyexprr>   s         @r&   Úadd_business_daysz'ExprDateTimeNameSpace.add_business_days-   sm   ø€ õj )¨Ñ+Ô+ˆÝ”W˜T 1 aÑ(Ô(ˆ
ÝØŒL×-Ò-ØØØEÐEÐEÐE¸HÐEÑEÔEØñ	ô ñ
ô 
ð 	
r(   Úeveryústr | dt.timedelta | Exprc                óÄ   — t          |t          j        ¦  «        rt          |¦  «        }t	          |d¬¦  «        }t          | j                             |¦  «        ¦  «        S )up  
        Divide the date/datetime range into buckets.

        Each date/datetime is mapped to the start of its bucket using the corresponding
        local datetime. Note that:

        - Weekly buckets start on Monday.
        - All other buckets start on the Unix epoch (1970-01-01).
        - Ambiguous results are localised using the DST offset of the original
          timestamp - for example, truncating `'2022-11-06 01:30:00 CST'` by
          `'1h'` results in `'2022-11-06 01:00:00 CST'`, whereas truncating
          `'2022-11-06 01:30:00 CDT'` by `'1h'` results in
          `'2022-11-06 01:00:00 CDT'`.

        Parameters
        ----------
        every
            The size of each bucket.

        Notes
        -----
        The `every` argument is created with
        the following string language:

        - 1ns   (1 nanosecond)
        - 1us   (1 microsecond)
        - 1ms   (1 millisecond)
        - 1s    (1 second)
        - 1m    (1 minute)
        - 1h    (1 hour)
        - 1d    (1 calendar day)
        - 1w    (1 calendar week)
        - 1mo   (1 calendar month)
        - 1q    (1 calendar quarter)
        - 1y    (1 calendar year)

        These strings can be combined:

        - 3d12h4m25s # 3 days, 12 hours, 4 minutes, and 25 seconds

        By "calendar day", we mean the corresponding time on the next day (which may
        not be 24 hours, due to daylight savings). Similarly for "calendar week",
        "calendar month", "calendar quarter", and "calendar year".

        Returns
        -------
        Expr
            Expression of data type :class:`Date` or :class:`Datetime`.

        Examples
        --------
        >>> from datetime import timedelta, datetime
        >>> df = (
        ...     pl.datetime_range(
        ...         datetime(2001, 1, 1),
        ...         datetime(2001, 1, 2),
        ...         timedelta(minutes=225),
        ...         eager=True,
        ...     )
        ...     .alias("datetime")
        ...     .to_frame()
        ... )
        >>> df
        shape: (7, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime            â”‚
        â”‚ ---                 â”‚
        â”‚ datetime[Î¼s]        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 00:00:00 â”‚
        â”‚ 2001-01-01 03:45:00 â”‚
        â”‚ 2001-01-01 07:30:00 â”‚
        â”‚ 2001-01-01 11:15:00 â”‚
        â”‚ 2001-01-01 15:00:00 â”‚
        â”‚ 2001-01-01 18:45:00 â”‚
        â”‚ 2001-01-01 22:30:00 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        >>> df.select(pl.col("datetime").dt.truncate("1h"))
        shape: (7, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime            â”‚
        â”‚ ---                 â”‚
        â”‚ datetime[Î¼s]        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 00:00:00 â”‚
        â”‚ 2001-01-01 03:00:00 â”‚
        â”‚ 2001-01-01 07:00:00 â”‚
        â”‚ 2001-01-01 11:00:00 â”‚
        â”‚ 2001-01-01 15:00:00 â”‚
        â”‚ 2001-01-01 18:00:00 â”‚
        â”‚ 2001-01-01 22:00:00 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        >>> truncate_str = df.select(pl.col("datetime").dt.truncate("1h"))
        >>> truncate_td = df.select(pl.col("datetime").dt.truncate(timedelta(hours=1)))
        >>> truncate_str.equals(truncate_td)
        True

        >>> df = (
        ...     pl.datetime_range(
        ...         datetime(2001, 1, 1), datetime(2001, 1, 1, 1), "10m", eager=True
        ...     )
        ...     .alias("datetime")
        ...     .to_frame()
        ... )
        >>> df.select(
        ...     "datetime", pl.col("datetime").dt.truncate("30m").alias("truncate")
        ... )
        shape: (7, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime            â”† truncate            â”‚
        â”‚ ---                 â”† ---                 â”‚
        â”‚ datetime[Î¼s]        â”† datetime[Î¼s]        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 00:00:00 â”† 2001-01-01 00:00:00 â”‚
        â”‚ 2001-01-01 00:10:00 â”† 2001-01-01 00:00:00 â”‚
        â”‚ 2001-01-01 00:20:00 â”† 2001-01-01 00:00:00 â”‚
        â”‚ 2001-01-01 00:30:00 â”† 2001-01-01 00:30:00 â”‚
        â”‚ 2001-01-01 00:40:00 â”† 2001-01-01 00:30:00 â”‚
        â”‚ 2001-01-01 00:50:00 â”† 2001-01-01 00:30:00 â”‚
        â”‚ 2001-01-01 01:00:00 â”† 2001-01-01 01:00:00 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        T©Ú
str_as_lit)Ú
isinstancer   Ú	timedeltar   r	   r   r$   Údt_truncate©r%   rE   s     r&   ÚtruncatezExprDateTimeNameSpace.truncate­   sV   € õv eRœ\Ñ*Ô*ð 	4Ý,¨UÑ3Ô3ˆEÝ% e¸Ð=Ñ=Ô=ˆÝ˜œ×1Ò1°%Ñ8Ô8Ñ9Ô9Ð9r(   ú#str | dt.timedelta | IntoExprColumnc                óÄ   — t          |t          j        ¦  «        rt          |¦  «        }t	          |d¬¦  «        }t          | j                             |¦  «        ¦  «        S )u×  
        Divide the date/datetime range into buckets.

        - Each date/datetime in the first half of the interval
          is mapped to the start of its bucket.
        - Each date/datetime in the second half of the interval
          is mapped to the end of its bucket.
        - Half-way points are mapped to the start of their bucket.

        Ambiguous results are localised using the DST offset of the original timestamp -
        for example, rounding `'2022-11-06 01:20:00 CST'` by `'1h'` results in
        `'2022-11-06 01:00:00 CST'`, whereas rounding `'2022-11-06 01:20:00 CDT'` by
        `'1h'` results in `'2022-11-06 01:00:00 CDT'`.

        Parameters
        ----------
        every
            Every interval start and period length

        Returns
        -------
        Expr
            Expression of data type :class:`Date` or :class:`Datetime`.

        Notes
        -----
        The `every` argument is created with
        the following small string formatting language:

        - 1ns   (1 nanosecond)
        - 1us   (1 microsecond)
        - 1ms   (1 millisecond)
        - 1s    (1 second)
        - 1m    (1 minute)
        - 1h    (1 hour)
        - 1d    (1 calendar day)
        - 1w    (1 calendar week)
        - 1mo   (1 calendar month)
        - 1q    (1 calendar quarter)
        - 1y    (1 calendar year)

        eg: 3d12h4m25s  # 3 days, 12 hours, 4 minutes, and 25 seconds

        By "calendar day", we mean the corresponding time on the next day (which may
        not be 24 hours, due to daylight savings). Similarly for "calendar week",
        "calendar month", "calendar quarter", and "calendar year".

        Examples
        --------
        >>> from datetime import timedelta, datetime
        >>> df = (
        ...     pl.datetime_range(
        ...         datetime(2001, 1, 1),
        ...         datetime(2001, 1, 2),
        ...         timedelta(minutes=225),
        ...         eager=True,
        ...     )
        ...     .alias("datetime")
        ...     .to_frame()
        ... )
        >>> df.with_columns(pl.col("datetime").dt.round("1h").alias("round"))
        shape: (7, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime            â”† round               â”‚
        â”‚ ---                 â”† ---                 â”‚
        â”‚ datetime[Î¼s]        â”† datetime[Î¼s]        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 00:00:00 â”† 2001-01-01 00:00:00 â”‚
        â”‚ 2001-01-01 03:45:00 â”† 2001-01-01 04:00:00 â”‚
        â”‚ 2001-01-01 07:30:00 â”† 2001-01-01 08:00:00 â”‚
        â”‚ 2001-01-01 11:15:00 â”† 2001-01-01 11:00:00 â”‚
        â”‚ 2001-01-01 15:00:00 â”† 2001-01-01 15:00:00 â”‚
        â”‚ 2001-01-01 18:45:00 â”† 2001-01-01 19:00:00 â”‚
        â”‚ 2001-01-01 22:30:00 â”† 2001-01-01 23:00:00 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        >>> df = (
        ...     pl.datetime_range(
        ...         datetime(2001, 1, 1), datetime(2001, 1, 1, 1), "10m", eager=True
        ...     )
        ...     .alias("datetime")
        ...     .to_frame()
        ... )
        >>> df.with_columns(pl.col("datetime").dt.round("30m").alias("round"))
        shape: (7, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime            â”† round               â”‚
        â”‚ ---                 â”† ---                 â”‚
        â”‚ datetime[Î¼s]        â”† datetime[Î¼s]        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 00:00:00 â”† 2001-01-01 00:00:00 â”‚
        â”‚ 2001-01-01 00:10:00 â”† 2001-01-01 00:00:00 â”‚
        â”‚ 2001-01-01 00:20:00 â”† 2001-01-01 00:30:00 â”‚
        â”‚ 2001-01-01 00:30:00 â”† 2001-01-01 00:30:00 â”‚
        â”‚ 2001-01-01 00:40:00 â”† 2001-01-01 00:30:00 â”‚
        â”‚ 2001-01-01 00:50:00 â”† 2001-01-01 01:00:00 â”‚
        â”‚ 2001-01-01 01:00:00 â”† 2001-01-01 01:00:00 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        TrH   )rJ   r   rK   r   r	   r   r$   Údt_roundrM   s     r&   ÚroundzExprDateTimeNameSpace.round-  sV   € õH eRœ\Ñ*Ô*ð 	4Ý,¨UÑ3Ô3ˆEÝ% e¸Ð=Ñ=Ô=ˆÝ˜œ×.Ò.¨uÑ5Ô5Ñ6Ô6Ð6r(   N)ÚyearÚmonthÚdayÚhourÚminuteÚsecondÚmicrosecondÚ	ambiguousrS   úint | IntoExpr | NonerT   rU   rV   rW   rX   rY   rZ   úAmbiguous | Exprc               óº   — t          |||||||¦  «        \  }}}}}}}t          |d¬¦  «        }	t          | j                             ||||||||	¦  «        ¦  «        S )uw
  
        Replace time unit.

        Parameters
        ----------
        year
            Column or literal.
        month
            Column or literal, ranging from 1-12.
        day
            Column or literal, ranging from 1-31.
        hour
            Column or literal, ranging from 0-23.
        minute
            Column or literal, ranging from 0-59.
        second
            Column or literal, ranging from 0-59.
        microsecond
            Column or literal, ranging from 0-999999.
        ambiguous
            Determine how to deal with ambiguous datetimes:

            - `'raise'` (default): raise
            - `'earliest'`: use the earliest datetime
            - `'latest'`: use the latest datetime
            - `'null'`: set to null

        Returns
        -------
        Expr
            Expression of data type :class:`Date` or :class:`Datetime` with the
            specified time units replaced.

        Examples
        --------
        >>> from datetime import date
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": [date(2024, 4, 1), date(2025, 3, 16)],
        ...         "new_day": [10, 15],
        ...     }
        ... )
        >>> df.with_columns(pl.col("date").dt.replace(day="new_day").alias("replaced"))
        shape: (2, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date       â”† new_day â”† replaced   â”‚
        â”‚ ---        â”† ---     â”† ---        â”‚
        â”‚ date       â”† i64     â”† date       â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2024-04-01 â”† 10      â”† 2024-04-10 â”‚
        â”‚ 2025-03-16 â”† 15      â”† 2025-03-15 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        >>> df.with_columns(pl.col("date").dt.replace(year=1800).alias("replaced"))
        shape: (2, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date       â”† new_day â”† replaced   â”‚
        â”‚ ---        â”† ---     â”† ---        â”‚
        â”‚ date       â”† i64     â”† date       â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2024-04-01 â”† 10      â”† 1800-04-01 â”‚
        â”‚ 2025-03-16 â”† 15      â”† 1800-03-16 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        TrH   )r
   r	   r   r$   Ú
dt_replace)
r%   rS   rT   rU   rV   rW   rX   rY   rZ   Úambiguous_exprs
             r&   ÚreplacezExprDateTimeNameSpace.replace–  s‡   € õX +ØU˜D $¨°¸ñô ñ 	<ˆˆUD˜$ ¨°õ
 /¨yÀTÐJÑJÔJˆÝØŒL×#Ò#ØØØØØØØØñ	ô 	ñ
ô 
ð 	
r(   ÚusÚtimeúdt.time | ExprÚ	time_unitr   c                óþ   — t          |t          j        t          j        f¦  «        s!dt          |¦  «        ›}t          |¦  «        ‚t          |¦  «        }t          | j	         
                    ||¦  «        ¦  «        S )uß  
        Create a naive Datetime from an existing Date/Datetime expression and a Time.

        If the underlying expression is a Datetime then its time component is replaced,
        and if it is a Date then a new Datetime is created by combining the two values.

        Parameters
        ----------
        time
            A python time literal or polars expression/column that resolves to a time.
        time_unit : {'ns', 'us', 'ms'}
            Unit of time.

        Examples
        --------
        >>> from datetime import datetime, date, time
        >>> df = pl.DataFrame(
        ...     {
        ...         "dtm": [
        ...             datetime(2022, 12, 31, 10, 30, 45),
        ...             datetime(2023, 7, 5, 23, 59, 59),
        ...         ],
        ...         "dt": [date(2022, 10, 10), date(2022, 7, 5)],
        ...         "tm": [time(1, 2, 3, 456000), time(7, 8, 9, 101000)],
        ...     }
        ... )
        >>> df
        shape: (2, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ dtm                 â”† dt         â”† tm           â”‚
        â”‚ ---                 â”† ---        â”† ---          â”‚
        â”‚ datetime[Î¼s]        â”† date       â”† time         â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2022-12-31 10:30:45 â”† 2022-10-10 â”† 01:02:03.456 â”‚
        â”‚ 2023-07-05 23:59:59 â”† 2022-07-05 â”† 07:08:09.101 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        >>> df.select(
        ...     [
        ...         pl.col("dtm").dt.combine(pl.col("tm")).alias("d1"),
        ...         pl.col("dt").dt.combine(pl.col("tm")).alias("d2"),
        ...         pl.col("dt").dt.combine(time(4, 5, 6)).alias("d3"),
        ...     ]
        ... )
        shape: (2, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ d1                      â”† d2                      â”† d3                  â”‚
        â”‚ ---                     â”† ---                     â”† ---                 â”‚
        â”‚ datetime[Î¼s]            â”† datetime[Î¼s]            â”† datetime[Î¼s]        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2022-12-31 01:02:03.456 â”† 2022-10-10 01:02:03.456 â”† 2022-10-10 04:05:06 â”‚
        â”‚ 2023-07-05 07:08:09.101 â”† 2022-07-05 07:08:09.101 â”† 2022-07-05 04:05:06 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        z@expected 'time' to be a Python time or Polars expression, found )rJ   r   rb   Úplr   r   Ú	TypeErrorr	   r   r$   Ú
dt_combine)r%   rb   rd   Úmsgs       r&   ÚcombinezExprDateTimeNameSpace.combineô  sp   € õl ˜$¥¤­"¬'Ð 2Ñ3Ô3ð 	!ØrÕUhÐimÑUnÔUnÐrÐrˆCÝ˜C‘.”.Ð Ý$ TÑ*Ô*ˆÝ˜œ×0Ò0°°yÑAÔAÑBÔBÐBr(   Úformatú
str | Nonec                óX   — |€d}t          | j                             |¦  «        ¦  «        S )uS"  
        Convert a Date/Time/Datetime column into a String column with the given format.

        .. versionchanged:: 1.15.0
            Added support for the use of "iso:strict" as a format string.
        .. versionchanged:: 1.14.0
            Added support for the `Duration` dtype, and use of "iso" as a format string.

        Parameters
        ----------
        format
            * Format to use, refer to the `chrono strftime documentation
              <https://docs.rs/chrono/latest/chrono/format/strftime/index.html>`_
              for specification. Example: `"%y-%m-%d"`.

            * If no format is provided, the appropriate ISO format for the underlying
              data type is used. This can be made explicit by passing `"iso"` or
              `"iso:strict"` as the format string (see notes below for details).

        Notes
        -----
        * Similar to `cast(pl.String)`, but this method allows you to customize
          the formatting of the resulting string; if no format is provided, the
          appropriate ISO format for the underlying data type is used.

        * Datetime dtype expressions distinguish between "iso" and "iso:strict"
          format strings. The difference is in the inclusion of a "T" separator
          between the date and time components ("iso" results in ISO compliant
          date and time components, separated with a space; "iso:strict" returns
          the same components separated with a "T"). All other temporal types
          return the same value for both format strings.

        * Duration dtype expressions cannot be formatted with `strftime`. Instead,
          only "iso" and "polars" are supported as format strings. The "iso" format
          string results in ISO8601 duration string output, and "polars" results
          in the same form seen in the frame `repr`.

        Examples
        --------
        >>> from datetime import datetime, date, timedelta, time
        >>> df = pl.DataFrame(
        ...     {
        ...         "dt": [
        ...             date(1999, 3, 1),
        ...             date(2020, 5, 3),
        ...             date(2077, 7, 5),
        ...         ],
        ...         "dtm": [
        ...             datetime(1980, 8, 10, 0, 10, 20),
        ...             datetime(2010, 10, 20, 8, 25, 35),
        ...             datetime(2040, 12, 30, 16, 40, 50),
        ...         ],
        ...         "tm": [
        ...             time(1, 2, 3, 456789),
        ...             time(23, 59, 9, 101),
        ...             time(0, 0, 0, 100),
        ...         ],
        ...         "td": [
        ...             timedelta(days=-1, seconds=-42),
        ...             timedelta(days=14, hours=-10, microseconds=100),
        ...             timedelta(seconds=0),
        ...         ],
        ...     }
        ... )

        Default format for temporal dtypes is ISO8601:

        >>> import polars.selectors as cs
        >>> df.select(cs.temporal().dt.to_string().name.prefix("s_"))
        shape: (3, 4)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ s_dt       â”† s_dtm                      â”† s_tm            â”† s_td            â”‚
        â”‚ ---        â”† ---                        â”† ---             â”† ---             â”‚
        â”‚ str        â”† str                        â”† str             â”† str             â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1999-03-01 â”† 1980-08-10 00:10:20.000000 â”† 01:02:03.456789 â”† -P1DT42S        â”‚
        â”‚ 2020-05-03 â”† 2010-10-20 08:25:35.000000 â”† 23:59:09.000101 â”† P13DT14H0.0001S â”‚
        â”‚ 2077-07-05 â”† 2040-12-30 16:40:50.000000 â”† 00:00:00.000100 â”† PT0S            â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        For `Datetime` specifically you can choose between "iso" (where the date and
        time components are ISO, separated by a space) and "iso:strict" (where these
        components are separated by a "T"):

        >>> df.select(
        ...     pl.col("dtm").dt.to_string("iso").alias("dtm_iso"),
        ...     pl.col("dtm").dt.to_string("iso:strict").alias("dtm_iso_strict"),
        ... )
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ dtm_iso                    â”† dtm_iso_strict             â”‚
        â”‚ ---                        â”† ---                        â”‚
        â”‚ str                        â”† str                        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1980-08-10 00:10:20.000000 â”† 1980-08-10T00:10:20.000000 â”‚
        â”‚ 2010-10-20 08:25:35.000000 â”† 2010-10-20T08:25:35.000000 â”‚
        â”‚ 2040-12-30 16:40:50.000000 â”† 2040-12-30T16:40:50.000000 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        All temporal types (aside from `Duration`) support strftime formatting:

        >>> df.select(
        ...     pl.col("dtm"),
        ...     s_dtm=pl.col("dtm").dt.to_string("%Y/%m/%d (%H.%M.%S)"),
        ... )
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ dtm                 â”† s_dtm                 â”‚
        â”‚ ---                 â”† ---                   â”‚
        â”‚ datetime[Î¼s]        â”† str                   â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1980-08-10 00:10:20 â”† 1980/08/10 (00.10.20) â”‚
        â”‚ 2010-10-20 08:25:35 â”† 2010/10/20 (08.25.35) â”‚
        â”‚ 2040-12-30 16:40:50 â”† 2040/12/30 (16.40.50) â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        The Polars Duration string format (as seen in the frame repr) is also available:

        >>> df.select(
        ...     pl.col("td"),
        ...     s_td=pl.col("td").dt.to_string("polars"),
        ... )
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ td            â”† s_td          â”‚
        â”‚ ---           â”† ---           â”‚
        â”‚ duration[Î¼s]  â”† str           â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ -1d -42s      â”† -1d -42s      â”‚
        â”‚ 13d 14h 100Âµs â”† 13d 14h 100Âµs â”‚
        â”‚ 0Âµs           â”† 0Âµs           â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        If you're interested in extracting the day or month names, you can use
        the `'%A'` and `'%B'` strftime specifiers:

        >>> df.select(
        ...     pl.col("dt"),
        ...     day_name=pl.col("dtm").dt.to_string("%A"),
        ...     month_name=pl.col("dtm").dt.to_string("%B"),
        ... )
        shape: (3, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ dt         â”† day_name  â”† month_name â”‚
        â”‚ ---        â”† ---       â”† ---        â”‚
        â”‚ date       â”† str       â”† str        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1999-03-01 â”† Sunday    â”† August     â”‚
        â”‚ 2020-05-03 â”† Wednesday â”† October    â”‚
        â”‚ 2077-07-05 â”† Sunday    â”† December   â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        NÚiso)r   r$   Údt_to_string©r%   rk   s     r&   Ú	to_stringzExprDateTimeNameSpace.to_string0  s-   € ðr ˆ>ØˆFÝ˜œ×2Ò2°6Ñ:Ô:Ñ;Ô;Ð;r(   Ústrc                ó,   — |                       |¦  «        S )u)  
        Convert a Date/Time/Datetime column into a String column with the given format.

        Similar to `cast(pl.String)`, but this method allows you to customize the
        formatting of the resulting string.

        Alias for :func:`to_string`.

        Parameters
        ----------
        format
            Format to use, refer to the `chrono strftime documentation
            <https://docs.rs/chrono/latest/chrono/format/strftime/index.html>`_
            for specification. Example: `"%y-%m-%d"`.

        See Also
        --------
        to_string : The identical expression for which `strftime` is an alias.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "datetime": [
        ...             datetime(2020, 3, 1),
        ...             datetime(2020, 4, 1),
        ...             datetime(2020, 5, 1),
        ...         ]
        ...     }
        ... )
        >>> df.with_columns(
        ...     pl.col("datetime")
        ...     .dt.strftime("%Y/%m/%d %H:%M:%S")
        ...     .alias("datetime_string")
        ... )
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime            â”† datetime_string     â”‚
        â”‚ ---                 â”† ---                 â”‚
        â”‚ datetime[Î¼s]        â”† str                 â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-03-01 00:00:00 â”† 2020/03/01 00:00:00 â”‚
        â”‚ 2020-04-01 00:00:00 â”† 2020/04/01 00:00:00 â”‚
        â”‚ 2020-05-01 00:00:00 â”† 2020/05/01 00:00:00 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        If you're interested in the day name / month name, you can use
        `'%A'` / `'%B'`:

        >>> df.with_columns(
        ...     day_name=pl.col("datetime").dt.strftime("%A"),
        ...     month_name=pl.col("datetime").dt.strftime("%B"),
        ... )
        shape: (3, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime            â”† day_name  â”† month_name â”‚
        â”‚ ---                 â”† ---       â”† ---        â”‚
        â”‚ datetime[Î¼s]        â”† str       â”† str        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-03-01 00:00:00 â”† Sunday    â”† March      â”‚
        â”‚ 2020-04-01 00:00:00 â”† Wednesday â”† April      â”‚
        â”‚ 2020-05-01 00:00:00 â”† Friday    â”† May        â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )rq   rp   s     r&   ÚstrftimezExprDateTimeNameSpace.strftimeÍ  s   € ðD ~Š~˜fÑ%Ô%Ð%r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u  
        Extract the millennium from underlying representation.

        Applies to Date and Datetime columns.

        Returns the millennium number in the calendar date.

        Returns
        -------
        Expr
            Expression of data type :class:`Int32`.

        Examples
        --------
        >>> from datetime import date
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": [
        ...             date(999, 12, 31),
        ...             date(1897, 5, 7),
        ...             date(2000, 1, 1),
        ...             date(2001, 7, 5),
        ...             date(3002, 10, 20),
        ...         ]
        ...     }
        ... )
        >>> df.with_columns(mlnm=pl.col("date").dt.millennium())
        shape: (5, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
        â”‚ date       â”† mlnm â”‚
        â”‚ ---        â”† ---  â”‚
        â”‚ date       â”† i32  â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
        â”‚ 0999-12-31 â”† 1    â”‚
        â”‚ 1897-05-07 â”† 2    â”‚
        â”‚ 2000-01-01 â”† 2    â”‚
        â”‚ 2001-07-05 â”† 3    â”‚
        â”‚ 3002-10-20 â”† 4    â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_millennium©r%   s    r&   Ú
millenniumz ExprDateTimeNameSpace.millennium  s!   € õR ˜œ×3Ò3Ñ5Ô5Ñ6Ô6Ð6r(   c                óN   — t          | j                             ¦   «         ¦  «        S )uÿ  
        Extract the century from underlying representation.

        Applies to Date and Datetime columns.

        Returns the century number in the calendar date.

        Returns
        -------
        Expr
            Expression of data type :class:`Int32`.

        Examples
        --------
        >>> from datetime import date
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": [
        ...             date(999, 12, 31),
        ...             date(1897, 5, 7),
        ...             date(2000, 1, 1),
        ...             date(2001, 7, 5),
        ...             date(3002, 10, 20),
        ...         ]
        ...     }
        ... )
        >>> df.with_columns(cent=pl.col("date").dt.century())
        shape: (5, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
        â”‚ date       â”† cent â”‚
        â”‚ ---        â”† ---  â”‚
        â”‚ date       â”† i32  â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
        â”‚ 0999-12-31 â”† 10   â”‚
        â”‚ 1897-05-07 â”† 19   â”‚
        â”‚ 2000-01-01 â”† 20   â”‚
        â”‚ 2001-07-05 â”† 21   â”‚
        â”‚ 3002-10-20 â”† 31   â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Ú
dt_centuryrw   s    r&   ÚcenturyzExprDateTimeNameSpace.century<  s!   € õR ˜œ×0Ò0Ñ2Ô2Ñ3Ô3Ð3r(   c                óN   — t          | j                             ¦   «         ¦  «        S )uj  
        Extract year from underlying Date representation.

        Applies to Date and Datetime columns.

        Returns the year number in the calendar date.

        Returns
        -------
        Expr
            Expression of data type :class:`Int32`.

        Examples
        --------
        >>> from datetime import date
        >>> df = pl.DataFrame(
        ...     {"date": [date(1977, 1, 1), date(1978, 1, 1), date(1979, 1, 1)]}
        ... )
        >>> df.with_columns(
        ...     calendar_year=pl.col("date").dt.year(),
        ...     iso_year=pl.col("date").dt.iso_year(),
        ... )
        shape: (3, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date       â”† calendar_year â”† iso_year â”‚
        â”‚ ---        â”† ---           â”† ---      â”‚
        â”‚ date       â”† i32           â”† i32      â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1977-01-01 â”† 1977          â”† 1976     â”‚
        â”‚ 1978-01-01 â”† 1978          â”† 1977     â”‚
        â”‚ 1979-01-01 â”† 1979          â”† 1979     â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_yearrw   s    r&   rS   zExprDateTimeNameSpace.yearg  s!   € õD ˜œ×-Ò-Ñ/Ô/Ñ0Ô0Ð0r(   )r0   r2   c               ó˜   ‡— t          j        ddd¦  «        Št          | j                             |ˆfd„|D ¦   «         ¦  «        ¦  «        S )uU  
        Determine whether each day lands on a business day.

        .. warning::
            This functionality is considered **unstable**. It may be changed
            at any point without it being considered a breaking change.

        Parameters
        ----------
        week_mask
            Which days of the week to count. The default is Monday to Friday.
            If you wanted to count only Monday to Thursday, you would pass
            `(True, True, True, True, False, False, False)`.
        holidays
            Holidays to exclude from the count. The Python package
            `python-holidays <https://github.com/vacanza/python-holidays>`_
            may come in handy here. You can install it with ``pip install holidays``,
            and then, to get all Dutch holidays for years 2020-2024:

            .. code-block:: python

                import holidays

                my_holidays = holidays.country_holidays("NL", years=range(2020, 2025))

            and pass `holidays=my_holidays` when you call `is_business_day`.

        Returns
        -------
        Expr
            Expression of data type :class:`Boolean`.

        Examples
        --------
        >>> from datetime import date
        >>> df = pl.DataFrame({"start": [date(2020, 1, 3), date(2020, 1, 5)]})
        >>> df.with_columns(is_business_day=pl.col("start").dt.is_business_day())
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ start      â”† is_business_day â”‚
        â”‚ ---        â”† ---             â”‚
        â”‚ date       â”† bool            â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-03 â”† true            â”‚
        â”‚ 2020-01-05 â”† false           â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        You can pass a custom weekend - for example, if you only take Sunday off:

        >>> week_mask = (True, True, True, True, True, True, False)
        >>> df.with_columns(
        ...     is_business_day=pl.col("start").dt.is_business_day(week_mask=week_mask)
        ... )
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ start      â”† is_business_day â”‚
        â”‚ ---        â”† ---             â”‚
        â”‚ date       â”† bool            â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-03 â”† true            â”‚
        â”‚ 2020-01-05 â”† false           â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        You can also pass a list of holidays:

        >>> from datetime import date
        >>> holidays = [date(2020, 1, 3), date(2020, 1, 6)]
        >>> df.with_columns(
        ...     is_business_day=pl.col("start").dt.is_business_day(holidays=holidays)
        ... )
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ start      â”† is_business_day â”‚
        â”‚ ---        â”† ---             â”‚
        â”‚ date       â”† bool            â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-03 â”† false           â”‚
        â”‚ 2020-01-05 â”† false           â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        r6   r7   c                ó$   •— g | ]}|‰z
  j         ‘ŒS r-   r9   r;   s     €r&   r?   z9ExprDateTimeNameSpace.is_business_day.<locals>.<listcomp>æ  r@   r(   )r   rA   r   r$   Údt_is_business_day)r%   r0   r2   r>   s      @r&   Úis_business_dayz%ExprDateTimeNameSpace.is_business_day‹  sZ   ø€ õn ”W˜T 1 aÑ(Ô(ˆ
ÝØŒL×+Ò+ØØEÐEÐEÐE¸HÐEÑEÔEñô ñ
ô 
ð 	
r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u%  
        Determine whether the year of the underlying date is a leap year.

        Applies to Date and Datetime columns.

        Returns
        -------
        Expr
            Expression of data type :class:`Boolean`.

        Examples
        --------
        >>> from datetime import date
        >>> df = pl.DataFrame(
        ...     {"date": [date(2000, 1, 1), date(2001, 1, 1), date(2002, 1, 1)]}
        ... )
        >>> df.with_columns(
        ...     leap_year=pl.col("date").dt.is_leap_year(),
        ... )
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date       â”† leap_year â”‚
        â”‚ ---        â”† ---       â”‚
        â”‚ date       â”† bool      â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2000-01-01 â”† true      â”‚
        â”‚ 2001-01-01 â”† false     â”‚
        â”‚ 2002-01-01 â”† false     â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_is_leap_yearrw   s    r&   Úis_leap_yearz"ExprDateTimeNameSpace.is_leap_yearê  s    € õ> ˜œ×5Ò5Ñ7Ô7Ñ8Ô8Ð8r(   c                óN   — t          | j                             ¦   «         ¦  «        S )uÉ  
        Extract ISO year from underlying Date representation.

        Applies to Date and Datetime columns.

        Returns the year number in the ISO standard.
        This may not correspond with the calendar year.

        Returns
        -------
        Expr
            Expression of data type :class:`Int32`.

        Examples
        --------
        >>> from datetime import date
        >>> df = pl.DataFrame(
        ...     {"date": [date(1977, 1, 1), date(1978, 1, 1), date(1979, 1, 1)]}
        ... )
        >>> df.select(
        ...     "date",
        ...     pl.col("date").dt.year().alias("calendar_year"),
        ...     pl.col("date").dt.iso_year().alias("iso_year"),
        ... )
        shape: (3, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date       â”† calendar_year â”† iso_year â”‚
        â”‚ ---        â”† ---           â”† ---      â”‚
        â”‚ date       â”† i32           â”† i32      â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1977-01-01 â”† 1977          â”† 1976     â”‚
        â”‚ 1978-01-01 â”† 1978          â”† 1977     â”‚
        â”‚ 1979-01-01 â”† 1979          â”† 1979     â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_iso_yearrw   s    r&   Úiso_yearzExprDateTimeNameSpace.iso_year  s!   € õH ˜œ×1Ò1Ñ3Ô3Ñ4Ô4Ð4r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u  
        Extract quarter from underlying Date representation.

        Applies to Date and Datetime columns.

        Returns the quarter ranging from 1 to 4.

        Returns
        -------
        Expr
            Expression of data type :class:`Int8`.

        Examples
        --------
        >>> from datetime import date
        >>> df = pl.DataFrame(
        ...     {"date": [date(2001, 1, 1), date(2001, 6, 30), date(2001, 12, 27)]}
        ... )
        >>> df.with_columns(pl.col("date").dt.quarter().alias("quarter"))
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date       â”† quarter â”‚
        â”‚ ---        â”† ---     â”‚
        â”‚ date       â”† i8      â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 â”† 1       â”‚
        â”‚ 2001-06-30 â”† 2       â”‚
        â”‚ 2001-12-27 â”† 4       â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Ú
dt_quarterrw   s    r&   ÚquarterzExprDateTimeNameSpace.quarter1  s    € õ> ˜œ×0Ò0Ñ2Ô2Ñ3Ô3Ð3r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u  
        Extract month from underlying Date representation.

        Applies to Date and Datetime columns.

        Returns the month number starting from 1.
        The return value ranges from 1 to 12.

        Returns
        -------
        Expr
            Expression of data type :class:`Int8`.

        Examples
        --------
        >>> from datetime import date
        >>> df = pl.DataFrame(
        ...     {"date": [date(2001, 1, 1), date(2001, 6, 30), date(2001, 12, 27)]}
        ... )
        >>> df.with_columns(pl.col("date").dt.month().alias("month"))
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date       â”† month â”‚
        â”‚ ---        â”† ---   â”‚
        â”‚ date       â”† i8    â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 â”† 1     â”‚
        â”‚ 2001-06-30 â”† 6     â”‚
        â”‚ 2001-12-27 â”† 12    â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_monthrw   s    r&   rT   zExprDateTimeNameSpace.monthR  s!   € õ@ ˜œ×.Ò.Ñ0Ô0Ñ1Ô1Ð1r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u=  
        Extract the week from the underlying Date representation.

        Applies to Date and Datetime columns.

        Returns the ISO week number starting from 1.
        The return value ranges from 1 to 53. (The last week of year differs by years.)

        Returns
        -------
        Expr
            Expression of data type :class:`Int8`.

        Examples
        --------
        >>> from datetime import date
        >>> df = pl.DataFrame(
        ...     {"date": [date(2001, 1, 1), date(2001, 6, 30), date(2001, 12, 27)]}
        ... )
        >>> df.with_columns(pl.col("date").dt.week().alias("week"))
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
        â”‚ date       â”† week â”‚
        â”‚ ---        â”† ---  â”‚
        â”‚ date       â”† i8   â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 â”† 1    â”‚
        â”‚ 2001-06-30 â”† 26   â”‚
        â”‚ 2001-12-27 â”† 52   â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_weekrw   s    r&   ÚweekzExprDateTimeNameSpace.weekt  s!   € õ@ ˜œ×-Ò-Ñ/Ô/Ñ0Ô0Ð0r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u„  
        Extract the week day from the underlying Date representation.

        Applies to Date and Datetime columns.

        Returns the ISO weekday number where monday = 1 and sunday = 7

        Returns
        -------
        Expr
            Expression of data type :class:`Int8`.

        See Also
        --------
        day
        ordinal_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         â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Ú
dt_weekdayrw   s    r&   ÚweekdayzExprDateTimeNameSpace.weekday–  s!   € õZ ˜œ×0Ò0Ñ2Ô2Ñ3Ô3Ð3r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u¿  
        Extract day from underlying Date representation.

        Applies to Date and Datetime columns.

        Returns the day of month starting from 1.
        The return value ranges from 1 to 31. (The last day of month differs by months.)

        Returns
        -------
        Expr
            Expression of data type :class:`Int8`.

        See Also
        --------
        weekday
        ordinal_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         â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_dayrw   s    r&   rU   zExprDateTimeNameSpace.dayÅ  s!   € õ\ ˜œ×,Ò,Ñ.Ô.Ñ/Ô/Ð/r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u¾  
        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         â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_ordinal_dayrw   s    r&   Úordinal_dayz!ExprDateTimeNameSpace.ordinal_dayõ  s!   € õ\ ˜œ×4Ò4Ñ6Ô6Ñ7Ô7Ð7r(   c                óN   — t          | j                             ¦   «         ¦  «        S )uš  
        Extract time.

        Applies to Datetime columns only; fails on Date.

        Returns
        -------
        Expr
            Expression of data type :class:`Time`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "datetime": [
        ...             datetime(1978, 1, 1, 1, 1, 1, 0),
        ...             datetime(2024, 10, 13, 5, 30, 14, 500_000),
        ...             datetime(2065, 1, 1, 10, 20, 30, 60_000),
        ...         ]
        ...     }
        ... )
        >>> df.with_columns(pl.col("datetime").dt.time().alias("time"))
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime                â”† time         â”‚
        â”‚ ---                     â”† ---          â”‚
        â”‚ datetime[Î¼s]            â”† time         â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1978-01-01 01:01:01     â”† 01:01:01     â”‚
        â”‚ 2024-10-13 05:30:14.500 â”† 05:30:14.500 â”‚
        â”‚ 2065-01-01 10:20:30.060 â”† 10:20:30.060 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_timerw   s    r&   rb   zExprDateTimeNameSpace.time%  ó!   € õF ˜œ×-Ò-Ñ/Ô/Ñ0Ô0Ð0r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u  
        Extract date from date(time).

        Applies to Date and Datetime columns.

        Returns
        -------
        Expr
            Expression of data type :class:`Date`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "datetime": [
        ...             datetime(1978, 1, 1, 1, 1, 1, 0),
        ...             datetime(2024, 10, 13, 5, 30, 14, 500_000),
        ...             datetime(2065, 1, 1, 10, 20, 30, 60_000),
        ...         ]
        ...     }
        ... )
        >>> df.with_columns(pl.col("datetime").dt.date().alias("date"))
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime                â”† date       â”‚
        â”‚ ---                     â”† ---        â”‚
        â”‚ datetime[Î¼s]            â”† date       â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1978-01-01 01:01:01     â”† 1978-01-01 â”‚
        â”‚ 2024-10-13 05:30:14.500 â”† 2024-10-13 â”‚
        â”‚ 2065-01-01 10:20:30.060 â”† 2065-01-01 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_daterw   s    r&   rA   zExprDateTimeNameSpace.dateJ  rš   r(   zF`dt.datetime` is deprecated; use `dt.replace_time_zone(None)` instead.c                óN   — t          | j                             ¦   «         ¦  «        S )ug  
        Return datetime.

        .. deprecated:: 0.20.4
            Use the `dt.replace_time_zone(None)` method instead.

        Applies to Datetime columns.

        Returns
        -------
        Expr
            Expression of data type :class:`Datetime`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "datetime UTC": [
        ...             datetime(1978, 1, 1, 1, 1, 1, 0),
        ...             datetime(2024, 10, 13, 5, 30, 14, 500_000),
        ...             datetime(2065, 1, 1, 10, 20, 30, 60_000),
        ...         ]
        ...     },
        ...     schema={"datetime UTC": pl.Datetime(time_zone="UTC")},
        ... )
        >>> df.with_columns(  # doctest: +SKIP
        ...     pl.col("datetime UTC").dt.datetime().alias("datetime (no timezone)"),
        ... )
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime UTC                â”† datetime (no timezone)  â”‚
        â”‚ ---                         â”† ---                     â”‚
        â”‚ datetime[Î¼s, UTC]           â”† datetime[Î¼s]            â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1978-01-01 01:01:01 UTC     â”† 1978-01-01 01:01:01     â”‚
        â”‚ 2024-10-13 05:30:14.500 UTC â”† 2024-10-13 05:30:14.500 â”‚
        â”‚ 2065-01-01 10:20:30.060 UTC â”† 2065-01-01 10:20:30.060 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_datetimerw   s    r&   ÚdatetimezExprDateTimeNameSpace.datetimeo  s!   € õX ˜œ×1Ò1Ñ3Ô3Ñ4Ô4Ð4r(   c                óN   — t          | j                             ¦   «         ¦  «        S )uR  
        Extract hour from underlying DateTime representation.

        Applies to Datetime columns.

        Returns the hour number from 0 to 23.

        Returns
        -------
        Expr
            Expression of data type :class:`Int8`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "datetime": [
        ...             datetime(1978, 1, 1, 1, 1, 1, 0),
        ...             datetime(2024, 10, 13, 5, 30, 14, 500_000),
        ...             datetime(2065, 1, 1, 10, 20, 30, 60_000),
        ...         ]
        ...     }
        ... )
        >>> df.with_columns(
        ...     pl.col("datetime").dt.hour().alias("hour"),
        ...     pl.col("datetime").dt.minute().alias("minute"),
        ...     pl.col("datetime").dt.second().alias("second"),
        ...     pl.col("datetime").dt.millisecond().alias("millisecond"),
        ... )
        shape: (3, 5)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime                â”† hour â”† minute â”† second â”† millisecond â”‚
        â”‚ ---                     â”† ---  â”† ---    â”† ---    â”† ---         â”‚
        â”‚ datetime[Î¼s]            â”† i8   â”† i8     â”† i8     â”† i32         â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1978-01-01 01:01:01     â”† 1    â”† 1      â”† 1      â”† 0           â”‚
        â”‚ 2024-10-13 05:30:14.500 â”† 5    â”† 30     â”† 14     â”† 500         â”‚
        â”‚ 2065-01-01 10:20:30.060 â”† 10   â”† 20     â”† 30     â”† 60          â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_hourrw   s    r&   rV   zExprDateTimeNameSpace.hour  s!   € õT ˜œ×-Ò-Ñ/Ô/Ñ0Ô0Ð0r(   c                óN   — t          | j                             ¦   «         ¦  «        S )uW  
        Extract minutes from underlying DateTime representation.

        Applies to Datetime columns.

        Returns the minute number from 0 to 59.

        Returns
        -------
        Expr
            Expression of data type :class:`Int8`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "datetime": [
        ...             datetime(1978, 1, 1, 1, 1, 1, 0),
        ...             datetime(2024, 10, 13, 5, 30, 14, 500_000),
        ...             datetime(2065, 1, 1, 10, 20, 30, 60_000),
        ...         ]
        ...     }
        ... )
        >>> df.with_columns(
        ...     pl.col("datetime").dt.hour().alias("hour"),
        ...     pl.col("datetime").dt.minute().alias("minute"),
        ...     pl.col("datetime").dt.second().alias("second"),
        ...     pl.col("datetime").dt.millisecond().alias("millisecond"),
        ... )
        shape: (3, 5)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime                â”† hour â”† minute â”† second â”† millisecond â”‚
        â”‚ ---                     â”† ---  â”† ---    â”† ---    â”† ---         â”‚
        â”‚ datetime[Î¼s]            â”† i8   â”† i8     â”† i8     â”† i32         â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1978-01-01 01:01:01     â”† 1    â”† 1      â”† 1      â”† 0           â”‚
        â”‚ 2024-10-13 05:30:14.500 â”† 5    â”† 30     â”† 14     â”† 500         â”‚
        â”‚ 2065-01-01 10:20:30.060 â”† 10   â”† 20     â”† 30     â”† 60          â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Ú	dt_minuterw   s    r&   rW   zExprDateTimeNameSpace.minuteÉ  s!   € õT ˜œ×/Ò/Ñ1Ô1Ñ2Ô2Ð2r(   F)Ú
fractionalr¤   Úboolc               óÒ   — t          | j                             ¦   «         ¦  «        }|r>|t          | j                             ¦   «         ¦  «        t	          j        d¦  «        z  z   n|S )uò  
        Extract seconds from underlying DateTime representation.

        Applies to Datetime columns.

        Returns the integer second number from 0 to 59, or a floating
        point number from 0 < 60 if `fractional=True` that includes
        any milli/micro/nanosecond component.

        Parameters
        ----------
        fractional
            Whether to include the fractional component of the second.

        Returns
        -------
        Expr
            Expression of data type :class:`Int8` or :class:`Float64`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "datetime": [
        ...             datetime(1978, 1, 1, 1, 1, 1, 0),
        ...             datetime(2024, 10, 13, 5, 30, 14, 500_000),
        ...             datetime(2065, 1, 1, 10, 20, 30, 60_000),
        ...         ]
        ...     }
        ... )
        >>> df.with_columns(
        ...     pl.col("datetime").dt.hour().alias("hour"),
        ...     pl.col("datetime").dt.minute().alias("minute"),
        ...     pl.col("datetime").dt.second().alias("second"),
        ... )
        shape: (3, 4)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime                â”† hour â”† minute â”† second â”‚
        â”‚ ---                     â”† ---  â”† ---    â”† ---    â”‚
        â”‚ datetime[Î¼s]            â”† i8   â”† i8     â”† i8     â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•¡
        â”‚ 1978-01-01 01:01:01     â”† 1    â”† 1      â”† 1      â”‚
        â”‚ 2024-10-13 05:30:14.500 â”† 5    â”† 30     â”† 14     â”‚
        â”‚ 2065-01-01 10:20:30.060 â”† 10   â”† 20     â”† 30     â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        >>> df.with_columns(
        ...     pl.col("datetime").dt.hour().alias("hour"),
        ...     pl.col("datetime").dt.minute().alias("minute"),
        ...     pl.col("datetime").dt.second(fractional=True).alias("second"),
        ... )
        shape: (3, 4)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime                â”† hour â”† minute â”† second â”‚
        â”‚ ---                     â”† ---  â”† ---    â”† ---    â”‚
        â”‚ datetime[Î¼s]            â”† i8   â”† i8     â”† f64    â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•¡
        â”‚ 1978-01-01 01:01:01     â”† 1    â”† 1      â”† 1.0    â”‚
        â”‚ 2024-10-13 05:30:14.500 â”† 5    â”† 30     â”† 14.5   â”‚
        â”‚ 2065-01-01 10:20:30.060 â”† 10   â”† 20     â”† 30.06  â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        g    eÍÍA)r   r$   Ú	dt_secondÚdt_nanosecondÚFÚlit)r%   r¤   Úsecs      r&   rX   zExprDateTimeNameSpace.secondõ  sa   € õ~ ˜œ×.Ò.Ñ0Ô0Ñ1Ô1ˆð ðˆC•9˜Tœ\×7Ò7Ñ9Ô9Ñ:Ô:½Q¼UÀ?Ñ=SÔ=SÑSÑTÐTàð	
r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u,  
        Extract milliseconds from underlying DateTime representation.

        Applies to Datetime columns.

        Returns
        -------
        Expr
            Expression of data type :class:`Int32`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "datetime": [
        ...             datetime(1978, 1, 1, 1, 1, 1, 0),
        ...             datetime(2024, 10, 13, 5, 30, 14, 500_000),
        ...             datetime(2065, 1, 1, 10, 20, 30, 60_000),
        ...         ]
        ...     }
        ... )
        >>> df.with_columns(
        ...     pl.col("datetime").dt.hour().alias("hour"),
        ...     pl.col("datetime").dt.minute().alias("minute"),
        ...     pl.col("datetime").dt.second().alias("second"),
        ...     pl.col("datetime").dt.millisecond().alias("millisecond"),
        ... )
        shape: (3, 5)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime                â”† hour â”† minute â”† second â”† millisecond â”‚
        â”‚ ---                     â”† ---  â”† ---    â”† ---    â”† ---         â”‚
        â”‚ datetime[Î¼s]            â”† i8   â”† i8     â”† i8     â”† i32         â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1978-01-01 01:01:01     â”† 1    â”† 1      â”† 1      â”† 0           â”‚
        â”‚ 2024-10-13 05:30:14.500 â”† 5    â”† 30     â”† 14     â”† 500         â”‚
        â”‚ 2065-01-01 10:20:30.060 â”† 10   â”† 20     â”† 30     â”† 60          â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_millisecondrw   s    r&   Úmillisecondz!ExprDateTimeNameSpace.millisecond;  ó!   € õP ˜œ×4Ò4Ñ6Ô6Ñ7Ô7Ð7r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u,  
        Extract microseconds from underlying DateTime representation.

        Applies to Datetime columns.

        Returns
        -------
        Expr
            Expression of data type :class:`Int32`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "datetime": [
        ...             datetime(1978, 1, 1, 1, 1, 1, 0),
        ...             datetime(2024, 10, 13, 5, 30, 14, 500_000),
        ...             datetime(2065, 1, 1, 10, 20, 30, 60_000),
        ...         ]
        ...     }
        ... )
        >>> df.with_columns(
        ...     pl.col("datetime").dt.hour().alias("hour"),
        ...     pl.col("datetime").dt.minute().alias("minute"),
        ...     pl.col("datetime").dt.second().alias("second"),
        ...     pl.col("datetime").dt.microsecond().alias("microsecond"),
        ... )
        shape: (3, 5)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime                â”† hour â”† minute â”† second â”† microsecond â”‚
        â”‚ ---                     â”† ---  â”† ---    â”† ---    â”† ---         â”‚
        â”‚ datetime[Î¼s]            â”† i8   â”† i8     â”† i8     â”† i32         â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1978-01-01 01:01:01     â”† 1    â”† 1      â”† 1      â”† 0           â”‚
        â”‚ 2024-10-13 05:30:14.500 â”† 5    â”† 30     â”† 14     â”† 500000      â”‚
        â”‚ 2065-01-01 10:20:30.060 â”† 10   â”† 20     â”† 30     â”† 60000       â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_microsecondrw   s    r&   rY   z!ExprDateTimeNameSpace.microseconde  r¯   r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u  
        Extract nanoseconds from underlying DateTime representation.

        Applies to Datetime columns.

        Returns
        -------
        Expr
            Expression of data type :class:`Int32`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "datetime": [
        ...             datetime(1978, 1, 1, 1, 1, 1, 0),
        ...             datetime(2024, 10, 13, 5, 30, 14, 500_000),
        ...             datetime(2065, 1, 1, 10, 20, 30, 60_000),
        ...         ]
        ...     }
        ... )
        >>> df.with_columns(
        ...     pl.col("datetime").dt.hour().alias("hour"),
        ...     pl.col("datetime").dt.minute().alias("minute"),
        ...     pl.col("datetime").dt.second().alias("second"),
        ...     pl.col("datetime").dt.nanosecond().alias("nanosecond"),
        ... )
        shape: (3, 5)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ datetime                â”† hour â”† minute â”† second â”† nanosecond â”‚
        â”‚ ---                     â”† ---  â”† ---    â”† ---    â”† ---        â”‚
        â”‚ datetime[Î¼s]            â”† i8   â”† i8     â”† i8     â”† i32        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1978-01-01 01:01:01     â”† 1    â”† 1      â”† 1      â”† 0          â”‚
        â”‚ 2024-10-13 05:30:14.500 â”† 5    â”† 30     â”† 14     â”† 500000000  â”‚
        â”‚ 2065-01-01 10:20:30.060 â”† 10   â”† 20     â”† 30     â”† 60000000   â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   r¨   rw   s    r&   Ú
nanosecondz ExprDateTimeNameSpace.nanosecond  s!   € õP ˜œ×3Ò3Ñ5Ô5Ñ6Ô6Ð6r(   r   c                óR  — |t           v r|                      |¦  «        S |dk    r&t          | j                             ¦   «         ¦  «        S |dk    rDt          | j        ¦  «                             t          ¦  «                             t          ¦  «        S d|›}t          |¦  «        ‚)u  
        Get the time passed since the Unix EPOCH in the give time unit.

        Parameters
        ----------
        time_unit : {'ns', 'us', 'ms', 's', 'd'}
            Time unit.

        Examples
        --------
        >>> from datetime import date
        >>> df = (
        ...     pl.date_range(date(2001, 1, 1), date(2001, 1, 3), eager=True)
        ...     .alias("date")
        ...     .to_frame()
        ... )
        >>> df.with_columns(
        ...     pl.col("date").dt.epoch().alias("epoch_ns"),
        ...     pl.col("date").dt.epoch(time_unit="s").alias("epoch_s"),
        ... )
        shape: (3, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date       â”† epoch_ns        â”† epoch_s   â”‚
        â”‚ ---        â”† ---             â”† ---       â”‚
        â”‚ date       â”† i64             â”† i64       â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 â”† 978307200000000 â”† 978307200 â”‚
        â”‚ 2001-01-02 â”† 978393600000000 â”† 978393600 â”‚
        â”‚ 2001-01-03 â”† 978480000000000 â”† 978480000 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        ÚsÚdz=`time_unit` must be one of {'ns', 'us', 'ms', 's', 'd'}, got )	r   Ú	timestampr   r$   Údt_epoch_secondsÚcastr   r   Ú
ValueError)r%   rd   ri   s      r&   ÚepochzExprDateTimeNameSpace.epoch¹  s›   € ð@ Õ,Ð,Ð,Ø—>’> )Ñ,Ô,Ð,Ø˜#ÒÐÝ˜Tœ\×:Ò:Ñ<Ô<Ñ=Ô=Ð=Ø˜#ÒÐÝ˜Tœ\Ñ*Ô*×/Ò/µÑ5Ô5×:Ò:½5ÑAÔAÐAàaÐT]ÐaÐaˆCÝ˜S‘/”/Ð!r(   c                óP   — t          | j                             |¦  «        ¦  «        S )u¥  
        Return a timestamp in the given time unit.

        Parameters
        ----------
        time_unit : {'ns', 'us', 'ms'}
            Time unit.

        Examples
        --------
        >>> from datetime import date
        >>> df = (
        ...     pl.date_range(date(2001, 1, 1), date(2001, 1, 3), eager=True)
        ...     .alias("date")
        ...     .to_frame()
        ... )
        >>> df.with_columns(
        ...     pl.col("date").dt.timestamp().alias("timestamp_us"),
        ...     pl.col("date").dt.timestamp("ms").alias("timestamp_ms"),
        ... )
        shape: (3, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date       â”† timestamp_us    â”† timestamp_ms â”‚
        â”‚ ---        â”† ---             â”† ---          â”‚
        â”‚ date       â”† i64             â”† i64          â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 â”† 978307200000000 â”† 978307200000 â”‚
        â”‚ 2001-01-02 â”† 978393600000000 â”† 978393600000 â”‚
        â”‚ 2001-01-03 â”† 978480000000000 â”† 978480000000 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_timestamp©r%   rd   s     r&   r·   zExprDateTimeNameSpace.timestampã  s#   € õ@ ˜œ×2Ò2°9Ñ=Ô=Ñ>Ô>Ð>r(   zi`dt.with_time_unit` is deprecated; instead, first cast to `Int64` and then cast to the desired data type.c                óP   — t          | j                             |¦  «        ¦  «        S )uQ  
        Set time unit of an expression of dtype Datetime or Duration.

        .. deprecated:: 0.20.5
            First cast to `Int64` and then cast to the desired data type.

        This does not modify underlying data, and should be used to fix an incorrect
        time unit.

        Parameters
        ----------
        time_unit : {'ns', 'us', 'ms'}
            Unit of time for the `Datetime` or `Duration` expression.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": pl.datetime_range(
        ...             datetime(2001, 1, 1),
        ...             datetime(2001, 1, 3),
        ...             "1d",
        ...             time_unit="ns",
        ...             eager=True,
        ...         )
        ...     }
        ... )
        >>> df.select(
        ...     pl.col("date"),
        ...     pl.col("date").dt.with_time_unit("us").alias("time_unit_us"),
        ... )  # doctest: +SKIP
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date                â”† time_unit_us          â”‚
        â”‚ ---                 â”† ---                   â”‚
        â”‚ datetime[ns]        â”† datetime[Î¼s]          â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 00:00:00 â”† +32971-04-28 00:00:00 â”‚
        â”‚ 2001-01-02 00:00:00 â”† +32974-01-22 00:00:00 â”‚
        â”‚ 2001-01-03 00:00:00 â”† +32976-10-18 00:00:00 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_with_time_unitr¾   s     r&   Úwith_time_unitz$ExprDateTimeNameSpace.with_time_unit  s#   € õ` ˜œ×7Ò7¸	ÑBÔBÑCÔCÐCr(   c                óP   — t          | j                             |¦  «        ¦  «        S )uª  
        Cast the underlying data to another time unit. This may lose precision.

        Parameters
        ----------
        time_unit : {'ns', 'us', 'ms'}
            Time unit for the `Datetime` expression.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": pl.datetime_range(
        ...             datetime(2001, 1, 1), datetime(2001, 1, 3), "1d", eager=True
        ...         )
        ...     }
        ... )
        >>> df.select(
        ...     [
        ...         pl.col("date"),
        ...         pl.col("date").dt.cast_time_unit("ms").alias("time_unit_ms"),
        ...         pl.col("date").dt.cast_time_unit("ns").alias("time_unit_ns"),
        ...     ]
        ... )
        shape: (3, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date                â”† time_unit_ms        â”† time_unit_ns        â”‚
        â”‚ ---                 â”† ---                 â”† ---                 â”‚
        â”‚ datetime[Î¼s]        â”† datetime[ms]        â”† datetime[ns]        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 00:00:00 â”† 2001-01-01 00:00:00 â”† 2001-01-01 00:00:00 â”‚
        â”‚ 2001-01-02 00:00:00 â”† 2001-01-02 00:00:00 â”† 2001-01-02 00:00:00 â”‚
        â”‚ 2001-01-03 00:00:00 â”† 2001-01-03 00:00:00 â”† 2001-01-03 00:00:00 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_cast_time_unitr¾   s     r&   Úcast_time_unitz$ExprDateTimeNameSpace.cast_time_unit7  s#   € õJ ˜œ×7Ò7¸	ÑBÔBÑCÔCÐCr(   Ú	time_zonec                óP   — t          | j                             |¦  «        ¦  «        S )u  
        Convert to given time zone for an expression of type Datetime.

        Parameters
        ----------
        time_zone
            Time zone for the `Datetime` expression.

        Notes
        -----
        If converting from a time-zone-naive datetime, then conversion will happen
        as if converting from UTC, regardless of your system's time zone.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": pl.datetime_range(
        ...             datetime(2020, 3, 1),
        ...             datetime(2020, 5, 1),
        ...             "1mo",
        ...             time_zone="UTC",
        ...             eager=True,
        ...         ),
        ...     }
        ... )
        >>> df.select(
        ...     [
        ...         pl.col("date"),
        ...         pl.col("date")
        ...         .dt.convert_time_zone(time_zone="Europe/London")
        ...         .alias("London"),
        ...     ]
        ... )
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date                    â”† London                      â”‚
        â”‚ ---                     â”† ---                         â”‚
        â”‚ datetime[Î¼s, UTC]       â”† datetime[Î¼s, Europe/London] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-03-01 00:00:00 UTC â”† 2020-03-01 00:00:00 GMT     â”‚
        â”‚ 2020-04-01 00:00:00 UTC â”† 2020-04-01 01:00:00 BST     â”‚
        â”‚ 2020-05-01 00:00:00 UTC â”† 2020-05-01 01:00:00 BST     â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_convert_time_zone)r%   rÅ   s     r&   Úconvert_time_zonez'ExprDateTimeNameSpace.convert_time_zone^  s#   € õ^ ˜œ×:Ò:¸9ÑEÔEÑFÔFÐFr(   )rZ   Únon_existentrÉ   r   c               óº   — t          |t          j        ¦  «        st          j        |¦  «        }t          | j                             ||j        |¦  «        ¦  «        S )ut  
        Replace time zone for an expression of type Datetime.

        Different from `convert_time_zone`, this will also modify
        the underlying timestamp and will ignore the original time zone.

        Parameters
        ----------
        time_zone
            Time zone for the `Datetime` expression. Pass `None` to unset time zone.
        ambiguous
            Determine how to deal with ambiguous datetimes:

            - `'raise'` (default): raise
            - `'earliest'`: use the earliest datetime
            - `'latest'`: use the latest datetime
            - `'null'`: set to null
        non_existent
            Determine how to deal with non-existent datetimes:

            - `'raise'` (default): raise
            - `'null'`: set to null

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "london_timezone": pl.datetime_range(
        ...             datetime(2020, 3, 1),
        ...             datetime(2020, 7, 1),
        ...             "1mo",
        ...             time_zone="UTC",
        ...             eager=True,
        ...         ).dt.convert_time_zone(time_zone="Europe/London"),
        ...     }
        ... )
        >>> df.select(
        ...     [
        ...         pl.col("london_timezone"),
        ...         pl.col("london_timezone")
        ...         .dt.replace_time_zone(time_zone="Europe/Amsterdam")
        ...         .alias("London_to_Amsterdam"),
        ...     ]
        ... )
        shape: (5, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ london_timezone             â”† London_to_Amsterdam            â”‚
        â”‚ ---                         â”† ---                            â”‚
        â”‚ datetime[Î¼s, Europe/London] â”† datetime[Î¼s, Europe/Amsterdam] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-03-01 00:00:00 GMT     â”† 2020-03-01 00:00:00 CET        â”‚
        â”‚ 2020-04-01 01:00:00 BST     â”† 2020-04-01 01:00:00 CEST       â”‚
        â”‚ 2020-05-01 01:00:00 BST     â”† 2020-05-01 01:00:00 CEST       â”‚
        â”‚ 2020-06-01 01:00:00 BST     â”† 2020-06-01 01:00:00 CEST       â”‚
        â”‚ 2020-07-01 01:00:00 BST     â”† 2020-07-01 01:00:00 CEST       â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        You can use `ambiguous` to deal with ambiguous datetimes:

        >>> dates = [
        ...     "2018-10-28 01:30",
        ...     "2018-10-28 02:00",
        ...     "2018-10-28 02:30",
        ...     "2018-10-28 02:00",
        ... ]
        >>> df = pl.DataFrame(
        ...     {
        ...         "ts": pl.Series(dates).str.strptime(pl.Datetime),
        ...         "ambiguous": ["earliest", "earliest", "latest", "latest"],
        ...     }
        ... )
        >>> df.with_columns(
        ...     ts_localized=pl.col("ts").dt.replace_time_zone(
        ...         "Europe/Brussels", ambiguous=pl.col("ambiguous")
        ...     )
        ... )
        shape: (4, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ ts                  â”† ambiguous â”† ts_localized                  â”‚
        â”‚ ---                 â”† ---       â”† ---                           â”‚
        â”‚ datetime[Î¼s]        â”† str       â”† datetime[Î¼s, Europe/Brussels] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2018-10-28 01:30:00 â”† earliest  â”† 2018-10-28 01:30:00 CEST      â”‚
        â”‚ 2018-10-28 02:00:00 â”† earliest  â”† 2018-10-28 02:00:00 CEST      â”‚
        â”‚ 2018-10-28 02:30:00 â”† latest    â”† 2018-10-28 02:30:00 CET       â”‚
        â”‚ 2018-10-28 02:00:00 â”† latest    â”† 2018-10-28 02:00:00 CET       â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )rJ   rf   r   r©   rª   r   r$   Údt_replace_time_zone)r%   rÅ   rZ   rÉ   s       r&   Úreplace_time_zonez'ExprDateTimeNameSpace.replace_time_zone  sY   € õ@ ˜)¥R¤WÑ-Ô-ð 	)Ýœ˜iÑ(Ô(ˆIÝØŒL×-Ò-Ø˜9Ô,¨lñô ñ
ô 
ð 	
r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u.  
        Extract the total days from a Duration type.

        Returns
        -------
        Expr
            Expression of data type :class:`Int64`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": pl.datetime_range(
        ...             datetime(2020, 3, 1), datetime(2020, 5, 1), "1mo", eager=True
        ...         ),
        ...     }
        ... )
        >>> df.select(
        ...     [
        ...         pl.col("date"),
        ...         pl.col("date").diff().dt.total_days().alias("days_diff"),
        ...     ]
        ... )
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date                â”† days_diff â”‚
        â”‚ ---                 â”† ---       â”‚
        â”‚ datetime[Î¼s]        â”† i64       â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-03-01 00:00:00 â”† null      â”‚
        â”‚ 2020-04-01 00:00:00 â”† 31        â”‚
        â”‚ 2020-05-01 00:00:00 â”† 30        â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_total_daysrw   s    r&   Ú
total_daysz ExprDateTimeNameSpace.total_days÷  s!   € õH ˜œ×3Ò3Ñ5Ô5Ñ6Ô6Ð6r(   c                óN   — t          | j                             ¦   «         ¦  «        S )ur  
        Extract the total hours from a Duration type.

        Returns
        -------
        Expr
            Expression of data type :class:`Int64`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": pl.datetime_range(
        ...             datetime(2020, 1, 1), datetime(2020, 1, 4), "1d", eager=True
        ...         ),
        ...     }
        ... )
        >>> df.select(
        ...     [
        ...         pl.col("date"),
        ...         pl.col("date").diff().dt.total_hours().alias("hours_diff"),
        ...     ]
        ... )
        shape: (4, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date                â”† hours_diff â”‚
        â”‚ ---                 â”† ---        â”‚
        â”‚ datetime[Î¼s]        â”† i64        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-01 00:00:00 â”† null       â”‚
        â”‚ 2020-01-02 00:00:00 â”† 24         â”‚
        â”‚ 2020-01-03 00:00:00 â”† 24         â”‚
        â”‚ 2020-01-04 00:00:00 â”† 24         â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_total_hoursrw   s    r&   Útotal_hoursz!ExprDateTimeNameSpace.total_hours  s!   € õJ ˜œ×4Ò4Ñ6Ô6Ñ7Ô7Ð7r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u˜  
        Extract the total minutes from a Duration type.

        Returns
        -------
        Expr
            Expression of data type :class:`Int64`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": pl.datetime_range(
        ...             datetime(2020, 1, 1), datetime(2020, 1, 4), "1d", eager=True
        ...         ),
        ...     }
        ... )
        >>> df.select(
        ...     [
        ...         pl.col("date"),
        ...         pl.col("date").diff().dt.total_minutes().alias("minutes_diff"),
        ...     ]
        ... )
        shape: (4, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date                â”† minutes_diff â”‚
        â”‚ ---                 â”† ---          â”‚
        â”‚ datetime[Î¼s]        â”† i64          â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-01 00:00:00 â”† null         â”‚
        â”‚ 2020-01-02 00:00:00 â”† 1440         â”‚
        â”‚ 2020-01-03 00:00:00 â”† 1440         â”‚
        â”‚ 2020-01-04 00:00:00 â”† 1440         â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_total_minutesrw   s    r&   Útotal_minutesz#ExprDateTimeNameSpace.total_minutesD  s!   € õJ ˜œ×6Ò6Ñ8Ô8Ñ9Ô9Ð9r(   c                óN   — t          | j                             ¦   «         ¦  «        S )uó  
        Extract the total seconds from a Duration type.

        Returns
        -------
        Expr
            Expression of data type :class:`Int64`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": pl.datetime_range(
        ...             datetime(2020, 1, 1),
        ...             datetime(2020, 1, 1, 0, 4, 0),
        ...             "1m",
        ...             eager=True,
        ...         ),
        ...     }
        ... )
        >>> df.select(
        ...     pl.col("date"),
        ...     pl.col("date").diff().dt.total_seconds().alias("seconds_diff"),
        ... )
        shape: (5, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date                â”† seconds_diff â”‚
        â”‚ ---                 â”† ---          â”‚
        â”‚ datetime[Î¼s]        â”† i64          â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-01 00:00:00 â”† null         â”‚
        â”‚ 2020-01-01 00:01:00 â”† 60           â”‚
        â”‚ 2020-01-01 00:02:00 â”† 60           â”‚
        â”‚ 2020-01-01 00:03:00 â”† 60           â”‚
        â”‚ 2020-01-01 00:04:00 â”† 60           â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_total_secondsrw   s    r&   Útotal_secondsz#ExprDateTimeNameSpace.total_secondsk  s!   € õN ˜œ×6Ò6Ñ8Ô8Ñ9Ô9Ð9r(   c                óN   — t          | j                             ¦   «         ¦  «        S )uÖ  
        Extract the total milliseconds from a Duration type.

        Returns
        -------
        Expr
            Expression of data type :class:`Int64`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": pl.datetime_range(
        ...             datetime(2020, 1, 1),
        ...             datetime(2020, 1, 1, 0, 0, 1, 0),
        ...             "200ms",
        ...             eager=True,
        ...         ),
        ...     }
        ... )
        >>> df.select(
        ...     pl.col("date"),
        ...     milliseconds_diff=pl.col("date").diff().dt.total_milliseconds(),
        ... )
        shape: (6, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date                    â”† milliseconds_diff â”‚
        â”‚ ---                     â”† ---               â”‚
        â”‚ datetime[Î¼s]            â”† i64               â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-01 00:00:00     â”† null              â”‚
        â”‚ 2020-01-01 00:00:00.200 â”† 200               â”‚
        â”‚ 2020-01-01 00:00:00.400 â”† 200               â”‚
        â”‚ 2020-01-01 00:00:00.600 â”† 200               â”‚
        â”‚ 2020-01-01 00:00:00.800 â”† 200               â”‚
        â”‚ 2020-01-01 00:00:01     â”† 200               â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_total_millisecondsrw   s    r&   Útotal_millisecondsz(ExprDateTimeNameSpace.total_milliseconds”  ó!   € õP ˜œ×;Ò;Ñ=Ô=Ñ>Ô>Ð>r(   c                óN   — t          | j                             ¦   «         ¦  «        S )uÖ  
        Extract the total microseconds from a Duration type.

        Returns
        -------
        Expr
            Expression of data type :class:`Int64`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": pl.datetime_range(
        ...             datetime(2020, 1, 1),
        ...             datetime(2020, 1, 1, 0, 0, 1, 0),
        ...             "200ms",
        ...             eager=True,
        ...         ),
        ...     }
        ... )
        >>> df.select(
        ...     pl.col("date"),
        ...     milliseconds_diff=pl.col("date").diff().dt.total_microseconds(),
        ... )
        shape: (6, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date                    â”† milliseconds_diff â”‚
        â”‚ ---                     â”† ---               â”‚
        â”‚ datetime[Î¼s]            â”† i64               â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-01 00:00:00     â”† null              â”‚
        â”‚ 2020-01-01 00:00:00.200 â”† 200000            â”‚
        â”‚ 2020-01-01 00:00:00.400 â”† 200000            â”‚
        â”‚ 2020-01-01 00:00:00.600 â”† 200000            â”‚
        â”‚ 2020-01-01 00:00:00.800 â”† 200000            â”‚
        â”‚ 2020-01-01 00:00:01     â”† 200000            â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_total_microsecondsrw   s    r&   Útotal_microsecondsz(ExprDateTimeNameSpace.total_microseconds¾  rÜ   r(   c                óN   — t          | j                             ¦   «         ¦  «        S )uÔ  
        Extract the total nanoseconds from a Duration type.

        Returns
        -------
        Expr
            Expression of data type :class:`Int64`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "date": pl.datetime_range(
        ...             datetime(2020, 1, 1),
        ...             datetime(2020, 1, 1, 0, 0, 1, 0),
        ...             "200ms",
        ...             eager=True,
        ...         ),
        ...     }
        ... )
        >>> df.select(
        ...     pl.col("date"),
        ...     milliseconds_diff=pl.col("date").diff().dt.total_nanoseconds(),
        ... )
        shape: (6, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date                    â”† milliseconds_diff â”‚
        â”‚ ---                     â”† ---               â”‚
        â”‚ datetime[Î¼s]            â”† i64               â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-01-01 00:00:00     â”† null              â”‚
        â”‚ 2020-01-01 00:00:00.200 â”† 200000000         â”‚
        â”‚ 2020-01-01 00:00:00.400 â”† 200000000         â”‚
        â”‚ 2020-01-01 00:00:00.600 â”† 200000000         â”‚
        â”‚ 2020-01-01 00:00:00.800 â”† 200000000         â”‚
        â”‚ 2020-01-01 00:00:01     â”† 200000000         â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_total_nanosecondsrw   s    r&   Útotal_nanosecondsz'ExprDateTimeNameSpace.total_nanosecondsè  s!   € õP ˜œ×:Ò:Ñ<Ô<Ñ=Ô=Ð=r(   Úbyú
str | Exprc                ór   — t          |d¬¦  «        }t          | j                             |¦  «        ¦  «        S )uû  
        Offset this date by a relative time offset.

        This differs from `pl.col("foo") + timedelta` in that it can
        take months and leap years into account. Note that only a single minus
        sign is allowed in the `by` string, as the first character.

        Parameters
        ----------
        by
            The offset is dictated by the following string language:

            - 1ns   (1 nanosecond)
            - 1us   (1 microsecond)
            - 1ms   (1 millisecond)
            - 1s    (1 second)
            - 1m    (1 minute)
            - 1h    (1 hour)
            - 1d    (1 calendar day)
            - 1w    (1 calendar week)
            - 1mo   (1 calendar month)
            - 1q    (1 calendar quarter)
            - 1y    (1 calendar year)

            By "calendar day", we mean the corresponding time on the next day (which may
            not be 24 hours, due to daylight savings). Similarly for "calendar week",
            "calendar month", "calendar quarter", and "calendar year".

        Returns
        -------
        Expr
            Expression of data type :class:`Date` or :class:`Datetime`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "dates": pl.datetime_range(
        ...             datetime(2000, 1, 1), datetime(2005, 1, 1), "1y", eager=True
        ...         ),
        ...         "offset": ["1d", "2d", "-1d", "1mo", None, "1y"],
        ...     }
        ... )
        >>> df.select(
        ...     [
        ...         pl.col("dates").dt.offset_by("1y").alias("date_plus_1y"),
        ...         pl.col("dates").dt.offset_by("-1y2mo").alias("date_min"),
        ...     ]
        ... )
        shape: (6, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ date_plus_1y        â”† date_min            â”‚
        â”‚ ---                 â”† ---                 â”‚
        â”‚ datetime[Î¼s]        â”† datetime[Î¼s]        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2001-01-01 00:00:00 â”† 1998-11-01 00:00:00 â”‚
        â”‚ 2002-01-01 00:00:00 â”† 1999-11-01 00:00:00 â”‚
        â”‚ 2003-01-01 00:00:00 â”† 2000-11-01 00:00:00 â”‚
        â”‚ 2004-01-01 00:00:00 â”† 2001-11-01 00:00:00 â”‚
        â”‚ 2005-01-01 00:00:00 â”† 2002-11-01 00:00:00 â”‚
        â”‚ 2006-01-01 00:00:00 â”† 2003-11-01 00:00:00 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        You can also pass the relative offset as an expression:

        >>> df.with_columns(new_dates=pl.col("dates").dt.offset_by(pl.col("offset")))
        shape: (6, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ dates               â”† offset â”† new_dates           â”‚
        â”‚ ---                 â”† ---    â”† ---                 â”‚
        â”‚ datetime[Î¼s]        â”† str    â”† datetime[Î¼s]        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2000-01-01 00:00:00 â”† 1d     â”† 2000-01-02 00:00:00 â”‚
        â”‚ 2001-01-01 00:00:00 â”† 2d     â”† 2001-01-03 00:00:00 â”‚
        â”‚ 2002-01-01 00:00:00 â”† -1d    â”† 2001-12-31 00:00:00 â”‚
        â”‚ 2003-01-01 00:00:00 â”† 1mo    â”† 2003-02-01 00:00:00 â”‚
        â”‚ 2004-01-01 00:00:00 â”† null   â”† null                â”‚
        â”‚ 2005-01-01 00:00:00 â”† 1y     â”† 2006-01-01 00:00:00 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        TrH   )r	   r   r$   Údt_offset_by)r%   rã   s     r&   Ú	offset_byzExprDateTimeNameSpace.offset_by	  s5   € õd # 2°$Ð7Ñ7Ô7ˆÝ˜œ×2Ò2°2Ñ6Ô6Ñ7Ô7Ð7r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u`  
        Roll backward to the first day of the month.

        For datetimes, the time-of-day is preserved.

        Returns
        -------
        Expr
            Expression of data type :class:`Date` or :class:`Datetime`.

        Notes
        -----
        If you're coming from pandas, you can think of this as a vectorised version
        of `pandas.tseries.offsets.MonthBegin().rollback(datetime)`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "dates": pl.datetime_range(
        ...             datetime(2000, 1, 15, 2),
        ...             datetime(2000, 12, 15, 2),
        ...             "1mo",
        ...             eager=True,
        ...         )
        ...     }
        ... )
        >>> df.select(pl.col("dates").dt.month_start())
        shape: (12, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ dates               â”‚
        â”‚ ---                 â”‚
        â”‚ datetime[Î¼s]        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2000-01-01 02:00:00 â”‚
        â”‚ 2000-02-01 02:00:00 â”‚
        â”‚ 2000-03-01 02:00:00 â”‚
        â”‚ 2000-04-01 02:00:00 â”‚
        â”‚ 2000-05-01 02:00:00 â”‚
        â”‚ â€¦                   â”‚
        â”‚ 2000-08-01 02:00:00 â”‚
        â”‚ 2000-09-01 02:00:00 â”‚
        â”‚ 2000-10-01 02:00:00 â”‚
        â”‚ 2000-11-01 02:00:00 â”‚
        â”‚ 2000-12-01 02:00:00 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_month_startrw   s    r&   Úmonth_startz!ExprDateTimeNameSpace.month_startg	  s!   € õb ˜œ×4Ò4Ñ6Ô6Ñ7Ô7Ð7r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u[  
        Roll forward to the last day of the month.

        For datetimes, the time-of-day is preserved.

        Returns
        -------
        Expr
            Expression of data type :class:`Date` or :class:`Datetime`.

        Notes
        -----
        If you're coming from pandas, you can think of this as a vectorised version
        of `pandas.tseries.offsets.MonthEnd().rollforward(datetime)`.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "dates": pl.datetime_range(
        ...             datetime(2000, 1, 1, 2),
        ...             datetime(2000, 12, 1, 2),
        ...             "1mo",
        ...             eager=True,
        ...         )
        ...     }
        ... )
        >>> df.select(pl.col("dates").dt.month_end())
        shape: (12, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ dates               â”‚
        â”‚ ---                 â”‚
        â”‚ datetime[Î¼s]        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2000-01-31 02:00:00 â”‚
        â”‚ 2000-02-29 02:00:00 â”‚
        â”‚ 2000-03-31 02:00:00 â”‚
        â”‚ 2000-04-30 02:00:00 â”‚
        â”‚ 2000-05-31 02:00:00 â”‚
        â”‚ â€¦                   â”‚
        â”‚ 2000-08-31 02:00:00 â”‚
        â”‚ 2000-09-30 02:00:00 â”‚
        â”‚ 2000-10-31 02:00:00 â”‚
        â”‚ 2000-11-30 02:00:00 â”‚
        â”‚ 2000-12-31 02:00:00 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_month_endrw   s    r&   Ú	month_endzExprDateTimeNameSpace.month_endš	  s!   € õb ˜œ×2Ò2Ñ4Ô4Ñ5Ô5Ð5r(   c                óN   — t          | j                             ¦   «         ¦  «        S )ud  
        Base offset from UTC.

        This is usually constant for all datetimes in a given time zone, but
        may vary in the rare case that a country switches time zone, like
        Samoa (Apia) did at the end of 2011.

        Returns
        -------
        Expr
            Expression of data type :class:`Duration`.

        See Also
        --------
        Expr.dt.dst_offset : Daylight savings offset from UTC.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "ts": [datetime(2011, 12, 29), datetime(2012, 1, 1)],
        ...     }
        ... )
        >>> df = df.with_columns(pl.col("ts").dt.replace_time_zone("Pacific/Apia"))
        >>> df.with_columns(pl.col("ts").dt.base_utc_offset().alias("base_utc_offset"))
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ ts                         â”† base_utc_offset â”‚
        â”‚ ---                        â”† ---             â”‚
        â”‚ datetime[Î¼s, Pacific/Apia] â”† duration[ms]    â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2011-12-29 00:00:00 -10    â”† -11h            â”‚
        â”‚ 2012-01-01 00:00:00 +14    â”† 13h             â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_base_utc_offsetrw   s    r&   Úbase_utc_offsetz%ExprDateTimeNameSpace.base_utc_offsetÍ	  s!   € õJ ˜œ×8Ò8Ñ:Ô:Ñ;Ô;Ð;r(   c                óN   — t          | j                             ¦   «         ¦  «        S )u®  
        Additional offset currently in effect (typically due to daylight saving time).

        Returns
        -------
        Expr
            Expression of data type :class:`Duration`.

        See Also
        --------
        Expr.dt.base_utc_offset : Base offset from UTC.

        Examples
        --------
        >>> from datetime import datetime
        >>> df = pl.DataFrame(
        ...     {
        ...         "ts": [datetime(2020, 10, 25), datetime(2020, 10, 26)],
        ...     }
        ... )
        >>> df = df.with_columns(pl.col("ts").dt.replace_time_zone("Europe/London"))
        >>> df.with_columns(pl.col("ts").dt.dst_offset().alias("dst_offset"))
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ ts                          â”† dst_offset   â”‚
        â”‚ ---                         â”† ---          â”‚
        â”‚ datetime[Î¼s, Europe/London] â”† duration[ms] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 2020-10-25 00:00:00 BST     â”† 1h           â”‚
        â”‚ 2020-10-26 00:00:00 GMT     â”† 0ms          â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r$   Údt_dst_offsetrw   s    r&   Ú
dst_offsetz ExprDateTimeNameSpace.dst_offsetô	  s!   € õB ˜œ×3Ò3Ñ5Ô5Ñ6Ô6Ð6r(   )r   r   r    r!   )r,   r-   r.   )
r)   r/   r0   r1   r2   r3   r4   r   r    r   )rE   rF   r    r   )rE   rO   r    r   )rS   r[   rT   r[   rU   r[   rV   r[   rW   r[   rX   r[   rY   r[   rZ   r\   r    r   )ra   )rb   rc   rd   r   r    r   r#   )rk   rl   r    r   )rk   rr   r    r   )r    r   )r0   r1   r2   r3   r    r   )r¤   r¥   r    r   )rd   r   r    r   )rd   r   r    r   )rÅ   rr   r    r   )rÅ   rl   rZ   r\   rÉ   r   r    r   )rã   rä   r    r   )7Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	_accessorr'   r   r   rD   rN   rR   r`   rj   rq   rt   rx   r{   rS   r   r„   r‡   rŠ   rT   r   r’   rU   r—   rb   rA   r   rŸ   rV   rW   rX   r®   rY   r³   r»   r·   rÁ   rÄ   rÈ   rÌ   rÏ   rÒ   rÕ   rØ   rÛ   rß   râ   rç   rê   rí   rð   ró   r-   r(   r&   r   r   %   s:  € € € € € Ø5Ð5à€Ið$ð $ð $ð $ð €XZ„ZØ#Ð#°&¸#°ÈÐQÑQÔQð %QØ&(Øð|
ð |
ð |
ð |
ñ RÔQñ „Zð|
ð|~:ð ~:ð ~:ð ~:ð@g7ð g7ð g7ð g7ðX '+Ø'+Ø%)Ø&*Ø(,Ø(,Ø-1Ø&-ð\
ð \
ð \
ð \
ð \
ð \
ð|:Cð :Cð :Cð :Cð :Cðx[<ð [<ð [<ð [<ð [<ðzB&ð B&ð B&ð B&ðH)7ð )7ð )7ð )7ðV)4ð )4ð )4ð )4ðV"1ð "1ð "1ð "1ðH €XZ„Zð %QØ&(ð	\
ð \
ð \
ð \
ð \
ñ „Zð\
ð|9ð 9ð 9ð 9ðB$5ð $5ð $5ð $5ðL4ð 4ð 4ð 4ðB 2ð  2ð  2ð  2ðD 1ð  1ð  1ð  1ðD-4ð -4ð -4ð -4ð^.0ð .0ð .0ð .0ð`.8ð .8ð .8ð .8ð`#1ð #1ð #1ð #1ðJ#1ð #1ð #1ð #1ðJ €ZØPñô ð)5ð )5ð )5ñô ð)5ðV*1ð *1ð *1ð *1ðX*3ð *3ð *3ð *3ðX ,1ð D
ð D
ð D
ð D
ð D
ð D
ðL(8ð (8ð (8ð (8ðT(8ð (8ð (8ð (8ðT(7ð (7ð (7ð (7ðT("ð ("ð ("ð ("ð ("ðT ?ð  ?ð  ?ð  ?ð  ?ðD €Zð	=ñô ð,Dð ,Dð ,Dñ	ô ð,Dð\%Dð %Dð %Dð %DðN/Gð /Gð /Gð /Gðj '.Ø$+ðf
ð f
ð f
ð f
ð f
ð f
ðP$7ð $7ð $7ð $7ðL%8ð %8ð %8ð %8ðN%:ð %:ð %:ð %:ðN':ð ':ð ':ð ':ðR(?ð (?ð (?ð (?ðT(?ð (?ð (?ð (?ðT(>ð (>ð (>ð (>ðTS8ð S8ð S8ð S8ðj18ð 18ð 18ð 18ðf16ð 16ð 16ð 16ðf%<ð %<ð %<ð %<ðN!7ð !7ð !7ð !7ð !7ð !7r(   r   ).Ú
__future__r   rŸ   r   Útypingr   Úpolars._reexportÚ	_reexportrf   Úpolarsr   r©   Úpolars._utils.convertr   Úpolars._utils.deprecationr   r   Úpolars._utils.parser	   r
   Úpolars._utils.unstabler   Úpolars._utils.variousr   Úpolars._utils.wrapr   Úpolars.datatypesr   r   r   ÚsysÚcollections.abcr   r   Úpolars._typingr   r   r   r   r   r   r   Úversion_infoÚwarningsÚtyping_extensionsr   r-   r(   r&   ú<module>r     sñ  ðØ "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð Ð Ð Ø !Ð !Ð !Ð !Ð !Ð !Ø :Ð :Ð :Ð :Ð :Ð :Ø PÐ PÐ PÐ PÐ PÐ PÐ PÐ PØ UÐ UÐ UÐ UÐ UÐ UÐ UÐ UØ +Ð +Ð +Ð +Ð +Ð +Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø (Ð (Ð (Ð (Ð (Ð (Ø >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >àð 1Ø€J€J€JØ(Ð(Ð(Ð(Ð(Ð(àÐÐÐÐÐðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð Ô˜7Ò"Ð"Ø'Ð'Ð'Ð'Ð'Ð'Ð'à0Ð0Ð0Ð0Ð0Ð0ðp'7ð p'7ð p'7ð p'7ð p'7ñ p'7ô p'7ð p'7ð p'7ð p'7r(   