Temporal#

The following methods are available under the expr.dt attribute.

Expr.dt.base_utc_offset()

Base offset from UTC.

Expr.dt.cast_time_unit(time_unit)

Cast the underlying data to another time unit.

Expr.dt.replace_time_zone(time_zone, *[, ...])

Replace time zone for an expression of type Datetime.

Expr.dt.combine(time[, time_unit])

Create a naive Datetime from an existing Date/Datetime expression and a Time.

Expr.dt.date()

Extract date from date(time).

Expr.dt.datetime()

Return datetime.

Expr.dt.day()

Extract day from underlying Date representation.

Expr.dt.days()

Extract the total days from a Duration type.

Expr.dt.dst_offset()

Additional offset currently in effect (typically due to daylight saving time).

Expr.dt.epoch([time_unit])

Get the time passed since the Unix EPOCH in the give time unit.

Expr.dt.hour()

Extract hour from underlying DateTime representation.

Expr.dt.hours()

Extract the total hours from a Duration type.

Expr.dt.is_leap_year()

Determine whether the year of the underlying date is a leap year.

Expr.dt.iso_year()

Extract ISO year from underlying Date representation.

Expr.dt.microsecond()

Extract microseconds from underlying DateTime representation.

Expr.dt.microseconds()

Extract the total microseconds from a Duration type.

Expr.dt.millisecond()

Extract milliseconds from underlying DateTime representation.

Expr.dt.milliseconds()

Extract the total milliseconds from a Duration type.

Expr.dt.minute()

Extract minutes from underlying DateTime representation.

Expr.dt.minutes()

Extract the total minutes from a Duration type.

Expr.dt.month()

Extract month from underlying Date representation.

Expr.dt.month_start()

Roll backward to the first day of the month.

Expr.dt.month_end()

Roll forward to the last day of the month.

Expr.dt.nanosecond()

Extract nanoseconds from underlying DateTime representation.

Expr.dt.nanoseconds()

Extract the total nanoseconds from a Duration type.

Expr.dt.offset_by(by)

Offset this date by a relative time offset.

Expr.dt.ordinal_day()

Extract ordinal day from underlying Date representation.

Expr.dt.quarter()

Extract quarter from underlying Date representation.

Expr.dt.round(every[, offset, ambiguous])

Divide the date/datetime range into buckets.

Expr.dt.second(*[, fractional])

Extract seconds from underlying DateTime representation.

Expr.dt.seconds()

Extract the total seconds from a Duration type.

Expr.dt.strftime(format)

Convert a Date/Time/Datetime column into a Utf8 column with the given format.

Expr.dt.time()

Extract time.

Expr.dt.timestamp([time_unit])

Return a timestamp in the given time unit.

Expr.dt.to_string(format)

Convert a Date/Time/Datetime column into a Utf8 column with the given format.

Expr.dt.total_days()

Extract the total days from a Duration type.

Expr.dt.total_hours()

Extract the total hours from a Duration type.

Expr.dt.total_microseconds()

Extract the total microseconds from a Duration type.

Expr.dt.total_milliseconds()

Extract the total milliseconds from a Duration type.

Expr.dt.total_minutes()

Extract the total minutes from a Duration type.

Expr.dt.total_nanoseconds()

Extract the total nanoseconds from a Duration type.

Expr.dt.total_seconds()

Extract the total seconds from a Duration type.

Expr.dt.truncate(every[, offset, ...])

Divide the date/datetime range into buckets.

Expr.dt.week()

Extract the week from the underlying Date representation.

Expr.dt.weekday()

Extract the week day from the underlying Date representation.

Expr.dt.with_time_unit(time_unit)

Set time unit of an expression of dtype Datetime or Duration.

Expr.dt.convert_time_zone(time_zone)

Convert to given time zone for an expression of type Datetime.

Expr.dt.year()

Extract year from underlying Date representation.