Type Definition polars_core::datatypes::DatetimeChunked
source · pub type DatetimeChunked = Logical<DatetimeType, Int64Type>;
Available on crate feature
dtype-datetime
only.Implementations§
source§impl DatetimeChunked
impl DatetimeChunked
pub fn as_datetime_iter(
&self
) -> impl Iterator<Item = Option<NaiveDateTime>> + TrustedLen + '_
Available on crate features
temporal
or dtype-datetime
or dtype-date
only.pub fn time_unit(&self) -> TimeUnit
Available on crate features
temporal
or dtype-datetime
or dtype-date
only.pub fn time_zone(&self) -> &Option<TimeZone>
Available on crate features
temporal
or dtype-datetime
or dtype-date
only.pub fn apply_on_tz_corrected<F>(&self, func: F) -> PolarsResult<DatetimeChunked>where
F: FnMut(DatetimeChunked) -> PolarsResult<DatetimeChunked>,
Available on crate features
temporal
or dtype-datetime
or dtype-date
only.pub fn cast_time_zone(&self, tz: &str) -> PolarsResult<DatetimeChunked>
Available on (crate features
temporal
or dtype-datetime
or dtype-date
) and crate feature timezones
only.sourcepub fn strftime(&self, fmt: &str) -> Utf8Chunked
Available on crate features temporal
or dtype-datetime
or dtype-date
only.
pub fn strftime(&self, fmt: &str) -> Utf8Chunked
temporal
or dtype-datetime
or dtype-date
only.Format Datetime with a fmt
rule. See chrono strftime/strptime.
sourcepub fn from_naive_datetime<I: IntoIterator<Item = NaiveDateTime>>(
name: &str,
v: I,
tu: TimeUnit
) -> Self
Available on crate features temporal
or dtype-datetime
or dtype-date
only.
pub fn from_naive_datetime<I: IntoIterator<Item = NaiveDateTime>>(
name: &str,
v: I,
tu: TimeUnit
) -> Self
temporal
or dtype-datetime
or dtype-date
only.Construct a new DatetimeChunked
from an iterator over NaiveDateTime
.
pub fn from_naive_datetime_options<I: IntoIterator<Item = Option<NaiveDateTime>>>(
name: &str,
v: I,
tu: TimeUnit
) -> Self
Available on crate features
temporal
or dtype-datetime
or dtype-date
only.sourcepub fn cast_time_unit(&self, tu: TimeUnit) -> Self
Available on crate features temporal
or dtype-datetime
or dtype-date
only.
pub fn cast_time_unit(&self, tu: TimeUnit) -> Self
temporal
or dtype-datetime
or dtype-date
only.Change the underlying TimeUnit
. And update the data accordingly.
sourcepub fn set_time_unit(&mut self, tu: TimeUnit)
Available on crate features temporal
or dtype-datetime
or dtype-date
only.
pub fn set_time_unit(&mut self, tu: TimeUnit)
temporal
or dtype-datetime
or dtype-date
only.Change the underlying TimeUnit
. This does not modify the data.
sourcepub fn set_time_zone(&mut self, tz: Option<TimeZone>)
Available on crate features temporal
or dtype-datetime
or dtype-date
only.
pub fn set_time_zone(&mut self, tz: Option<TimeZone>)
temporal
or dtype-datetime
or dtype-date
only.Change the underlying TimeZone
. This does not modify the data.
pub fn with_time_zone(self, tz: Option<TimeZone>) -> Self
Available on crate features
temporal
or dtype-datetime
or dtype-date
only.Trait Implementations§
source§impl IntoSeries for DatetimeChunked
impl IntoSeries for DatetimeChunked
source§impl LogicalType for DatetimeChunked
impl LogicalType for DatetimeChunked
source§fn get_any_value(&self, i: usize) -> PolarsResult<AnyValue<'_>>
fn get_any_value(&self, i: usize) -> PolarsResult<AnyValue<'_>>
Gets AnyValue from LogicalType