polars.Datetime#

class polars.Datetime(*args: Any, **kwargs: Any)[source]#

Calendar date and time type.

__init__(
time_unit: TimeUnit | None = 'us',
time_zone: str | timezone | None = None,
)[source]#

Calendar date and time type.

Parameters:
time_unit{‘us’, ‘ns’, ‘ms’}

Unit of time / precision.

time_zone

Time zone string, as defined in zoneinfo (to see valid strings run import zoneinfo; zoneinfo.available_timezones() for a full list). When using to match dtypes, can use “*” to check for Datetime columns that have any timezone.

Methods

__init__([time_unit, time_zone])

Calendar date and time type.

base_type()

Return this DataType's fundamental/root type class.

is_(other)

Check if this DataType is the same as another DataType.

is_not(other)

Check if this DataType is NOT the same as another DataType.

Attributes

is_nested

time_unit

time_zone