polars_plan::dsl::dt

Struct DateLikeNameSpace

Source
pub struct DateLikeNameSpace(/* private fields */);
Available on crate feature temporal only.
Expand description

Specialized expressions for Series with dates/datetimes.

Implementations§

Source§

impl DateLikeNameSpace

Source

pub fn add_business_days( self, n: Expr, week_mask: [bool; 7], holidays: Vec<i32>, roll: Roll, ) -> Expr

Available on crate feature business only.

Add a given number of business days.

Source

pub fn to_string(self, format: &str) -> Expr

Convert from Date/Time/Datetime into String with the given format. See chrono strftime/strptime.

Source

pub fn strftime(self, format: &str) -> Expr

Convert from Date/Time/Datetime into String with the given format. See chrono strftime/strptime.

Alias for to_string.

Source

pub fn cast_time_unit(self, tu: TimeUnit) -> Expr

Change the underlying TimeUnit. And update the data accordingly.

Source

pub fn with_time_unit(self, tu: TimeUnit) -> Expr

Change the underlying TimeUnit of the Series. This does not modify the data.

Source

pub fn convert_time_zone(self, time_zone: TimeZone) -> Expr

Available on crate feature timezones only.

Change the underlying TimeZone of the Series. This does not modify the data.

Source

pub fn millennium(self) -> Expr

Get the millennium of a Date/Datetime

Source

pub fn century(self) -> Expr

Get the century of a Date/Datetime

Source

pub fn year(self) -> Expr

Get the year of a Date/Datetime

Source

pub fn is_leap_year(self) -> Expr

Source

pub fn iso_year(self) -> Expr

Get the iso-year of a Date/Datetime. This may not correspond with a calendar year.

Source

pub fn month(self) -> Expr

Get the month of a Date/Datetime.

Source

pub fn quarter(self) -> Expr

Extract quarter from underlying NaiveDateTime representation. Quarters range from 1 to 4.

Source

pub fn week(self) -> Expr

Extract the week from the underlying Date representation. Can be performed on Date and Datetime

Returns the ISO week number starting from 1. The return value ranges from 1 to 53. (The last week of year differs by years.)

Source

pub fn weekday(self) -> Expr

Extract the ISO week day from the underlying Date representation. Can be performed on Date and Datetime.

Returns the weekday number where monday = 1 and sunday = 7

Source

pub fn day(self) -> Expr

Get the month of a Date/Datetime.

Source

pub fn ordinal_day(self) -> Expr

Get the ordinal_day of a Date/Datetime.

Source

pub fn time(self) -> Expr

Get the (local) time of a Date/Datetime/Time.

Source

pub fn date(self) -> Expr

Get the (local) date of a Date/Datetime.

Source

pub fn datetime(self) -> Expr

Get the (local) datetime of a Datetime.

Source

pub fn hour(self) -> Expr

Get the hour of a Datetime/Time64.

Source

pub fn minute(self) -> Expr

Get the minute of a Datetime/Time64.

Source

pub fn second(self) -> Expr

Get the second of a Datetime/Time64.

Source

pub fn millisecond(self) -> Expr

Get the millisecond of a Time64 (scaled from nanosecs).

Source

pub fn microsecond(self) -> Expr

Get the microsecond of a Time64 (scaled from nanosecs).

Source

pub fn nanosecond(self) -> Expr

Get the nanosecond part of a Time64.

Source

pub fn timestamp(self, tu: TimeUnit) -> Expr

Return the timestamp (UNIX epoch) of a Datetime/Date.

Source

pub fn truncate(self, every: Expr) -> Expr

Truncate the Datetime/Date range into buckets.

Source

pub fn month_start(self) -> Expr

Available on crate feature month_start only.

Roll backward to the first day of the month.

Source

pub fn month_end(self) -> Expr

Available on crate feature month_end only.

Roll forward to the last day of the month.

Source

pub fn base_utc_offset(self) -> Expr

Available on crate feature timezones only.

Get the base offset from UTC.

Source

pub fn dst_offset(self) -> Expr

Available on crate feature timezones only.

Get the additional offset from UTC currently in effect (usually due to daylight saving time).

Source

pub fn round(self, every: Expr) -> Expr

Round the Datetime/Date range into buckets.

Source

pub fn offset_by(self, by: Expr) -> Expr

Available on crate feature offset_by only.

Offset this Date/Datetime by a given offset Duration. This will take leap years/ months into account.

Source

pub fn replace_time_zone( self, time_zone: Option<TimeZone>, ambiguous: Expr, non_existent: NonExistent, ) -> Expr

Available on crate feature timezones only.
Source

pub fn combine(self, time: Expr, tu: TimeUnit) -> Expr

Combine an existing Date/Datetime with a Time, creating a new Datetime value.

Source

pub fn total_days(self) -> Expr

Express a Duration in terms of its total number of integer days.

Source

pub fn total_hours(self) -> Expr

Express a Duration in terms of its total number of integer hours.

Source

pub fn total_minutes(self) -> Expr

Express a Duration in terms of its total number of integer minutes.

Source

pub fn total_seconds(self) -> Expr

Express a Duration in terms of its total number of integer seconds.

Source

pub fn total_milliseconds(self) -> Expr

Express a Duration in terms of its total number of milliseconds.

Source

pub fn total_microseconds(self) -> Expr

Express a Duration in terms of its total number of microseconds.

Source

pub fn total_nanoseconds(self) -> Expr

Express a Duration in terms of its total number of nanoseconds.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> Ungil for T
where T: Send,