Temporal#

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

Expr.dt.cast_time_unit(tu)

Cast the underlying data to another time unit.

Expr.dt.cast_time_zone(tz)

Cast time zone for a Series of type Datetime.

Expr.dt.day()

Extract day from underlying Date representation.

Expr.dt.days()

Extract the days from a Duration type.

Expr.dt.epoch([tu])

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 hours from a Duration type.

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 microseconds from a Duration type.

Expr.dt.millisecond()

Extract milliseconds from underlying DateTime representation.

Expr.dt.milliseconds()

Extract the milliseconds from a Duration type.

Expr.dt.minute()

Extract minutes from underlying DateTime representation.

Expr.dt.minutes()

Extract the minutes from a Duration type.

Expr.dt.month()

Extract month from underlying Date representation.

Expr.dt.nanosecond()

Extract nanoseconds from underlying DateTime representation.

Expr.dt.nanoseconds()

Extract the 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])

Divide the date/datetime range into buckets.

Expr.dt.second([fractional])

Extract seconds from underlying DateTime representation.

Expr.dt.seconds()

Extract the seconds from a Duration type.

Expr.dt.strftime(fmt)

Format Date/datetime with a formatting rule.

Expr.dt.timestamp([tu])

Return a timestamp in the given time unit.

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

Divide the date/datetime range into buckets.

Expr.dt.tz_localize(tz)

Localize tz-naive Datetime Series to tz-aware Datetime Series.

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(tu)

Set time unit of a Series of dtype Datetime or Duration.

Expr.dt.with_time_zone(tz)

Set time zone for a Series of type Datetime.

Expr.dt.year()

Extract year from underlying Date representation.