class_docstr: Namespace for datetime related expressions.
docstr: 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 │
  └─────────────────────────┴─────────────────────────┴─────────────────────┘
docstr_tok: ["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",")","\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510","\u2502","dtm","\u2506","dt","\u2506","tm","\u2502","\u2502","--","-","\u2506","--","-","\u2506","--","-","\u2502","\u2502","datetime","[","\u03bcs","]","\u2506","date","\u2506","time","\u2502","\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561","\u2502","2022-12-31","10:30:45","\u2506","2022-10-10","\u2506","01:02:03.456","\u2502","\u2502","2023-07-05","23:59:59","\u2506","2022-07-05","\u2506","07:08:09.101","\u2502","\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518",">",">",">","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",")","\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510","\u2502","d1","\u2506","d2","\u2506","d3","\u2502","\u2502","--","-","\u2506","--","-","\u2506","--","-","\u2502","\u2502","datetime","[","\u03bcs","]","\u2506","datetime","[","\u03bcs","]","\u2506","datetime","[","\u03bcs","]","\u2502","\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561","\u2502","2022-12-31","01:02:03.456","\u2506","2022-10-10","01:02:03.456","\u2506","2022-10-10","04:05:06","\u2502","\u2502","2023-07-05","07:08:09.101","\u2506","2022-07-05","07:08:09.101","\u2506","2022-07-05","04:05:06","\u2502","\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"]
code: def combine(
      self, time: dt.time | Expr, time_unit: TimeUnit = "us"
  ) -> Expr:
      """
      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 │
      └─────────────────────────┴─────────────────────────┴─────────────────────┘
      """
      if not isinstance(time, (dt.time, pl.Expr)):
          raise TypeError(
              f"expected 'time' to be a Python time or Polars expression, found {type(time).__name__!r}"
          )
      time = parse_as_expression(time)
      return wrap_expr(self._pyexpr.dt_combine(time, time_unit))
  
imports: from __future__ import annotations
  import datetime
  from typing import TYPE_CHECKING
  import polars._reexport
  from polars import functions
  from polars.datatypes import DTYPE_TEMPORAL_UNITS, Date, Int32
  from polars.utils._parse_expr_input import parse_as_expression
  from polars.utils._wrap import wrap_expr
  from polars.utils.convert import _timedelta_to_pl_duration
  from polars.utils.deprecation import deprecate_renamed_function, deprecate_saturating, issue_deprecation_warning, rename_use_earliest_to_ambiguous
label_desc: Use image node_id 4 for calling the ExprDateTimeNameSpace obj's underlying member method code with example usage: obj.combine(time, time_unit) and returns: wrap_expr