ó
    à'·hZÐ ã                  óD   S SK Jr  S SKrS SKJr  S SKJr  S SK	J
r  S SKJr  S SKJrJr  S SKJrJr  S SKJr  S S	KJr  S S
KJr  S SKJrJrJrJr  \(       a?  S SKrS SK J!r!  S SK	J"r"  S SK#J$r$J%r%J&r&J'r'J(r(J)r)J*r*  \RV                  S:Œ  a  S SK,Jr  OS SK-Jr   " S S5      r.g)é    )Ú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ÚInt64)ÚIterable)ÚExpr)Ú	AmbiguousÚEpochTimeUnitÚIntoExprÚIntoExprColumnÚNonExistentÚRollÚTimeUnit)é   é   )r   c            	      ó    \ rS rSrSrSrSDS jr\" 5       \" SS/SS9   SE         SFS jj5       5       r	SGS jr
SHS jrSSSSSSSSS.                 SIS jjrSJSKS jjrSLSMS jjrSNS jrSOS jrSOS jrSOS jr\" 5       S	S
S.     SPS jj5       rSOS jrSOS jrSOS jrSOS jrSOS jrSOS jrSOS  jrSOS! jrSOS" jrSOS# jrSOS$ jr\" S%5      SOS& j5       r SOS' jr!SOS( jr"S)S*.SQS+ jjr#SOS, jr$SOS- jr%SOS. jr&SJSRS/ jjr'SJSSS0 jjr(\" S15      SSS2 j5       r)SSS3 jr*STS4 jr+SSS5.       SUS6 jjr,SOS7 jr-SOS8 jr.SOS9 jr/SOS: jr0SOS; jr1SOS< jr2SOS= jr3SVS> jr4SOS? jr5SOS@ jr6SOSA jr7SOSB jr8SCr9g)WÚExprDateTimeNameSpaceé%   z+Namespace for datetime related expressions.Údtc                ó&    UR                   U l         g ©N©Ú_pyexpr)ÚselfÚexprs     ÚgC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\polars/expr/datetime.pyÚ__init__ÚExprDateTimeNameSpace.__init__*   s    Ø||ó    r%   Únz1.12.0)Úallowed_argsÚversion©TTTTTFF© Úraisec                óì    [        U5      n[        R                  " SSS5      n[        U R                  R                  U[        U5      U Vs/ s H  owU-
  R                  PM     snU5      5      $ s  snf )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      â
ââââââââââââââŽââââââââââââââââââ
é²  é   )r	   r    Údater   r$   Údt_add_business_daysÚlistÚdays)r%   r+   Ú	week_maskÚholidaysÚrollÚn_pyexprÚ
unix_epochÚholidays           r'   Úadd_business_daysÚ'ExprDateTimeNameSpace.add_business_days-   sn    ôj )šÓ+ÜWWT 1 aÓ(
ÜØLL×-Ñ-ØÜYÙ<DÓEºH°JÑ&×,Ô,¹HÑEØó	ó
ð 	
ùò Fs   ÁA1c                ó²    [        U[        R                  5      (       a  [        U5      n[	        USS9n[        U R                  R                  U5      5      $ )u€  
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)

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%   ÚeveryÚevery_pyexprs      r'   ÚtruncateÚExprDateTimeNameSpace.truncate­   sF    ôn eR\\×*Ñ*Ü,šUÓ3EÜ,šUžtÑDÜ×1Ñ1°,Ó?Ó@Ð@r*   c                ó²    [        U[        R                  5      (       a  [        U5      n[	        USS9n[        U R                  R                  U5      5      $ )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)

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 â
âââââââââââââââââââââââŽââââââââââââââââââââââ
TrA   )rC   r    rD   r   r	   r   r$   Údt_roundrF   s      r'   ÚroundÚExprDateTimeNameSpace.round)  sF    ôD eR\\×*Ñ*Ü,šUÓ3EÜ,šUžtÑDÜ×.Ñ.š|Ó<Ó=Ð=r*   N)ÚyearÚmonthÚdayÚhourÚminuteÚsecondÚmicrosecondÚ	ambiguousc               ó    [        X2XXVU5      u  n	n
nnnnn[        USS9n[        U R                  R	                  UU
U	UUUUU5      5      $ )u§  
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 â
ââââââââââââââŽââââââââââŽâââââââââââââ
TrA   )r
   r	   r   r$   Ú
dt_replace)r%   rO   rP   rQ   rR   rS   rT   rU   rV   Ú
day_pyexprÚmonth_pyexprÚyear_pyexprÚhour_pyexprÚminute_pyexprÚsecond_pyexprÚmicrosecond_pyexprÚambiguous_exprs                    r'   ÚreplaceÚExprDateTimeNameSpace.replace  su    ôf +Ø F°Kó
ñ	
ØØØØØØØô /šyÀTÑJÜØLL×#Ñ#ØØØØØØØ"Øó	ó
ð 	
r*   c                óò    [        U[        R                  [        R                  45      (       d  S[        U5      < 3n[        U5      e[        U5      n[        U R                  R                  XB5      5      $ )uW  
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 )rC   r    ÚtimeÚplr   r   Ú	TypeErrorr	   r   r$   Ú
dt_combine)r%   rd   Ú	time_unitÚmsgÚtime_pyexprs        r'   ÚcombineÚExprDateTimeNameSpace.combineô  sa    ôl $€§¡¬"¯'©'Ð 2×3Ñ3ØTÔUhÐimÓUnÑTqÐrCÜC.Ð Ü+šDÓ1Ü×0Ñ0°ÓHÓIÐIr*   c                óT    Uc  Sn[        U R                  R                  U5      5      $ )u#  
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   â
ââââââââââââââŽââââââââââââŽâââââââââââââ
Úiso)r   r$   Údt_to_string©r%   Úformats     r'   Ú	to_stringÚExprDateTimeNameSpace.to_string0  s)    ðr >ØFÜ×2Ñ2°6Ó:Ó;Ð;r*   c                ó$    U R                  U5      $ )ua
  
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        â
âââââââââââââââââââââââŽââââââââââââŽâââââââââââââ
)rr   rp   s     r'   ÚstrftimeÚExprDateTimeNameSpace.strftimeÍ  s    ðD ~~fÓ%Ð%r*   c                óH    [        U R                  R                  5       5      $ )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'   Ú
millenniumÚ ExprDateTimeNameSpace.millennium  s    ôR ×3Ñ3Ó5Ó6Ð6r*   c                óH    [        U R                  R                  5       5      $ )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_centuryry   s    r'   ÚcenturyÚExprDateTimeNameSpace.century<  s    ôR ×0Ñ0Ó2Ó3Ð3r*   c                óH    [        U R                  R                  5       5      $ )u  
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_yearry   s    r'   rO   ÚExprDateTimeNameSpace.yearg  s    ôD ×-Ñ-Ó/Ó0Ð0r*   )r8   r9   c          
     óÒ    [         R                  " SSS5      n[        U R                  R	                  [        U5      U Vs/ s H  oDU-
  R                  PM     sn5      5      $ s  snf )u=  
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           â
ââââââââââââââŽââââââââââââââââââ
r2   r3   )r    r4   r   r$   Údt_is_business_dayr6   r7   )r%   r8   r9   r<   r=   s        r'   Úis_business_dayÚ%ExprDateTimeNameSpace.is_business_day  s^    ôn WWT 1 aÓ(
ÜØLL×+Ñ+ÜYÙ<DÓEºH°JÑ&×,Ô,¹HÑEóó
ð 	
ùò Fs   ÁA$c                óH    [        U R                  R                  5       5      $ )uU  
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_yearry   s    r'   Úis_leap_yearÚ"ExprDateTimeNameSpace.is_leap_yearê  s    ô> ×5Ñ5Ó7Ó8Ð8r*   c                óH    [        U R                  R                  5       5      $ )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_yearry   s    r'   Úiso_yearÚExprDateTimeNameSpace.iso_year  s    ôH ×1Ñ1Ó3Ó4Ð4r*   c                óH    [        U R                  R                  5       5      $ )uG  
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_quarterry   s    r'   ÚquarterÚExprDateTimeNameSpace.quarter1  s    ô> ×0Ñ0Ó2Ó3Ð3r*   c                óH    [        U R                  R                  5       5      $ )uJ  
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_monthry   s    r'   rP   ÚExprDateTimeNameSpace.monthR  s    ô@ ×.Ñ.Ó0Ó1Ð1r*   c                óH    [        U R                  R                  5       5      $ )u  
Extract the number of days in the month from the underlying Date representation.

Applies to Date and Datetime columns.

Returns the number of days in the month.
The return value ranges from 28 to 31.

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

See Also
--------
month
is_leap_year

Examples
--------
>>> from datetime import date
>>> df = pl.DataFrame(
...     {"date": [date(2001, 1, 1), date(2001, 2, 1), date(2000, 2, 1)]}
... )
>>> df.with_columns(pl.col("date").dt.days_in_month().alias("days_in_month"))
shape: (3, 2)
ââââââââââââââ¬ââââââââââââââââ
â date       â days_in_month â
â ---        â ---           â
â date       â i8            â
ââââââââââââââªââââââââââââââââ¡
â 2001-01-01 â 31            â
â 2001-02-01 â 28            â
â 2000-02-01 â 29            â
ââââââââââââââŽââââââââââââââââ
)r   r$   Údt_days_in_monthry   s    r'   Údays_in_monthÚ#ExprDateTimeNameSpace.days_in_montht  ó    ôJ ×6Ñ6Ó8Ó9Ð9r*   c                óH    [        U R                  R                  5       5      $ )um  
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_weekry   s    r'   ÚweekÚExprDateTimeNameSpace.week  s    ô@ ×-Ñ-Ó/Ó0Ð0r*   c                óH    [        U R                  R                  5       5      $ )uT  
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_weekdayry   s    r'   ÚweekdayÚExprDateTimeNameSpace.weekdayœ  s    ôZ ×0Ñ0Ó2Ó3Ð3r*   c                óH    [        U R                  R                  5       5      $ )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_dayry   s    r'   rQ   ÚExprDateTimeNameSpace.dayì  s    ô\ ×,Ñ,Ó.Ó/Ð/r*   c                óH    [        U R                  R                  5       5      $ )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_dayry   s    r'   Úordinal_dayÚ!ExprDateTimeNameSpace.ordinal_day  s    ô\ ×4Ñ4Ó6Ó7Ð7r*   c                óH    [        U R                  R                  5       5      $ )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_timery   s    r'   rd   ÚExprDateTimeNameSpace.timeL  ó    ôF ×-Ñ-Ó/Ó0Ð0r*   c                óH    [        U R                  R                  5       5      $ )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_datery   s    r'   r4   ÚExprDateTimeNameSpace.dateq  r­   r*   zF`dt.datetime` is deprecated; use `dt.replace_time_zone(None)` instead.c                óH    [        U R                  R                  5       5      $ )uO  
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_datetimery   s    r'   ÚdatetimeÚExprDateTimeNameSpace.datetime  s    ôX ×1Ñ1Ó3Ó4Ð4r*   c                óH    [        U R                  R                  5       5      $ )u2  
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_hourry   s    r'   rR   ÚExprDateTimeNameSpace.hourÄ  s    ôT ×-Ñ-Ó/Ó0Ð0r*   c                óH    [        U R                  R                  5       5      $ )u7  
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_minutery   s    r'   rS   ÚExprDateTimeNameSpace.minuteð  s    ôT ×/Ñ/Ó1Ó2Ð2r*   F)Ú
fractionalc               óÔ    [        U R                  R                  5       5      nU(       a=  U[        U R                  R                  5       5      [        R
                  " S5      -  -   $ U$ )u2  
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'   rT   ÚExprDateTimeNameSpace.second  sZ    ô~ ×.Ñ.Ó0Ó1ö ð 9T\\×7Ñ7Ó9Ó:ŒQ¿UºUÀ?Ó=SÑSÑTð	
ð ð	
r*   c                óH    [        U R                  R                  5       5      $ )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_millisecondry   s    r'   ÚmillisecondÚ!ExprDateTimeNameSpace.millisecondb  ó    ôP ×4Ñ4Ó6Ó7Ð7r*   c                óH    [        U R                  R                  5       5      $ )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_microsecondry   s    r'   rU   Ú!ExprDateTimeNameSpace.microsecond  rÇ   r*   c                óH    [        U R                  R                  5       5      $ )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Ÿ   ry   s    r'   Ú
nanosecondÚ ExprDateTimeNameSpace.nanosecond¶  s    ôP ×3Ñ3Ó5Ó6Ð6r*   c                óB   U[         ;   a  U R                  U5      $ US:X  a-  U R                  S5      [        R                  " S[        5      -  $ US:X  a;  [        U R                  5      R                  [        5      R                  [        5      $ SU< 3n[        U5      e)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Úmsiè  Údz=`time_unit` must be one of {'ns', 'us', 'ms', 's', 'd'}, got )r   Ú	timestampr¿   rÀ   r   r   r$   Úcastr   r   Ú
ValueError)r%   rh   ri   s      r'   ÚepochÚExprDateTimeNameSpace.epochà  s    ð@ Ô,Ó,Ø>> )Ó,Ð,Ø#ÓØ>> $Ó'¬1¯5ª5°ŽuÓ+=Ñ=Ð=Ø#ÓÜT\\Ó*×/Ñ/ŽÓ5×:Ñ:Œ5ÓAÐAàSÐT]ÑS`ÐaCÜS/Ð!r*   c                óJ    [        U R                  R                  U5      5      $ )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%   rh   s     r'   rÒ   Ú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                óJ    [        U R                  R                  U5      5      $ )u!  
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_unitÚ$ExprDateTimeNameSpace.with_time_unit,  s    ô` ×7Ñ7ž	ÓBÓCÐCr*   c                óJ    [        U R                  R                  U5      5      $ )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_unitÚ$ExprDateTimeNameSpace.cast_time_unit^  s    ôJ ×7Ñ7ž	ÓBÓCÐCr*   c                óJ    [        U R                  R                  U5      5      $ )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%   Ú	time_zones     r'   Úconvert_time_zoneÚ'ExprDateTimeNameSpace.convert_time_zone  s    ô^ ×:Ñ:ž9ÓEÓFÐFr*   )rV   Únon_existentc               óÊ    [        U[        R                  5      (       d  [        R                  " U5      n[        U R                  R                  XR                  U5      5      $ )uì  
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       â
âââââââââââââââââââââââŽââââââââââââŽââââââââââââââââââââââââââââââââ
)rC   re   r   r¿   rÀ   r   r$   Údt_replace_time_zone)r%   rå   rV   rè   s       r'   Úreplace_time_zoneÚ'ExprDateTimeNameSpace.replace_time_zone¶  sN    ô@ )€R§W¡W×-Ñ-ÜiÓ(IÜØLL×-Ñ-Ø×,Ñ,šlóó
ð 	
r*   c                óH    [        U R                  R                  5       5      $ )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_daysry   s    r'   Ú
total_daysÚ ExprDateTimeNameSpace.total_days  s    ôH ×3Ñ3Ó5Ó6Ð6r*   c                óH    [        U R                  R                  5       5      $ )uj  
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_hoursry   s    r'   Útotal_hoursÚ!ExprDateTimeNameSpace.total_hoursD  s    ôJ ×4Ñ4Ó6Ó7Ð7r*   c                óH    [        U R                  R                  5       5      $ )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_minutesry   s    r'   Útotal_minutesÚ#ExprDateTimeNameSpace.total_minutesk  r   r*   c                óH    [        U R                  R                  5       5      $ )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_secondsry   s    r'   Útotal_secondsÚ#ExprDateTimeNameSpace.total_seconds  s    ôN ×6Ñ6Ó8Ó9Ð9r*   c                óH    [        U R                  R                  5       5      $ )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_millisecondsry   s    r'   Útotal_millisecondsÚ(ExprDateTimeNameSpace.total_milliseconds»  ó    ôP ×;Ñ;Ó=Ó>Ð>r*   c                óH    [        U R                  R                  5       5      $ )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_microsecondsry   s    r'   Útotal_microsecondsÚ(ExprDateTimeNameSpace.total_microsecondså  r  r*   c                óH    [        U R                  R                  5       5      $ )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_nanosecondsry   s    r'   Útotal_nanosecondsÚ'ExprDateTimeNameSpace.total_nanoseconds	  s    ôP ×:Ñ:Ó<Ó=Ð=r*   c                ó^    [        USS9n[        U R                  R                  U5      5      $ )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 â
âââââââââââââââââââââââŽâââââââââŽââââââââââââââââââââââ
TrA   )r	   r   r$   Údt_offset_by)r%   ÚbyÚ	by_pyexprs      r'   Ú	offset_byÚExprDateTimeNameSpace.offset_by9	  s+    ôd *š"žÑ>	Ü×2Ñ2°9Ó=Ó>Ð>r*   c                óH    [        U R                  R                  5       5      $ )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_startry   s    r'   Úmonth_startÚ!ExprDateTimeNameSpace.month_start	  s    ôb ×4Ñ4Ó6Ó7Ð7r*   c                óH    [        U R                  R                  5       5      $ )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_endry   s    r'   Ú	month_endÚExprDateTimeNameSpace.month_endÁ	  s    ôb ×2Ñ2Ó4Ó5Ð5r*   c                óH    [        U R                  R                  5       5      $ )ul  
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_offsetry   s    r'   Úbase_utc_offsetÚ%ExprDateTimeNameSpace.base_utc_offsetô	  s    ôJ ×8Ñ8Ó:Ó;Ð;r*   c                óH    [        U R                  R                  5       5      $ )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_offsetry   s    r'   Ú
dst_offsetÚ ExprDateTimeNameSpace.dst_offset
  s    ôB ×3Ñ3Ó5Ó6Ð6r*   r#   )r&   r   ÚreturnÚNone)r.   r/   r0   )
r+   zint | IntoExprr8   úIterable[bool]r9   úIterable[dt.date]r:   r   r   r   )rG   zstr | dt.timedelta | Exprr   r   )rG   z#str | dt.timedelta | IntoExprColumnr   r   )rO   úint | IntoExpr | NonerP   r$  rQ   r$  rR   r$  rS   r$  rT   r$  rU   r$  rV   úAmbiguous | Exprr   r   )Úus)rd   zdt.time | Exprrh   r   r   r   r"   )rq   ú
str | Noner   r   )rq   Ústrr   r   )r   r   )r8   r"  r9   r#  r   r   )r»   Úboolr   r   )rh   r   r   r   )rh   r   r   r   )rå   r(  r   r   )rå   r'  rV   r%  rè   r   r   r   )r  z
str | Exprr   r   ):Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	_accessorr(   r   r   r>   rI   rM   ra   rk   rr   ru   rz   r~   rO   r   r   r   r   rP   r   r   r¡   rQ   rš   rd   r4   r   r³   rR   rS   rT   rÅ   rU   rÌ   rÕ   rÒ   rÝ   rá   ræ   rë   rï   ró   r÷   rû   rÿ   r  r  r  r  r  r  r  Ú__static_attributes__r/   r*   r'   r   r   %   s¿   Ù5àIô$ñ ZÙ#°&ž#°ÈÑQð %QØ&(Øð|
àð|
ð "ð|
ð $ð	|
ð
 ð|
ð 
ô|
ó Ró ð|
ô|zAôxe>ðT '+Ø'+Ø%)Ø&*Ø(,Ø(,Ø-1Ø&-ñb
ð $ðb
ð %ð	b
ð
 #ðb
ð $ðb
ð &ðb
ð &ðb
ð +ðb
ð $ðb
ð 
õb
öH:Jöx[<ôzB&ôH)7ôV)4ôV"1ñH Zð %QØ&(ñ	\
ð "ð\
ð $ð	\
ð
 
ô\
ó ð\
ô|9ôB$5ôL4ôB 2ôD%:ôN 1ôD-4ô^.0ô`.8ô`#1ôJ#1ñJ ØPóó)5óð)5ôV*1ôX*3ðX ,1÷ D
ôL(8ôT(8ôT(7öT("öT ?ñD ð	=óó,Dó	ð,Dô\%DôN/Gðj '.Ø$+ñf
àðf
ð $ð	f
ð
 "ðf
ð 
õf
ôP$7ôL%8ôN%:ôN':ôR(?ôT(?ôT(>ôTS?ôj18ôf16ôf%<÷N!7r*   r   )/Ú
__future__r   r³   r    Útypingr   Úpolars._reexportÚ	_reexportre   Ú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   r   ÚsysÚcollections.abcr   r   Úpolars._typingr   r   r   r   r   r   r   Úversion_infoÚwarningsÚtyping_extensionsr   r/   r*   r'   Ú<module>rC     si   ðÝ "ã Ý  å Ý !Ý :ß Pß UÝ +Ý 5Ý (ß EÓ EæÛÝ(å÷÷ ñ ð ×Ñ7Ó"Þ'å0÷W(7ò W(7r*   