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.replace_time_zone(time_zone)

Replace time zone for a Series of type Datetime.

Expr.dt.combine(tm[, tu])

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

Expr.dt.date()

Expr.dt.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.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 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.time()

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.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.convert_time_zone(time_zone)

Convert to given time zone for a Series of type Datetime.

Expr.dt.year()

Extract year from underlying Date representation.