Trait polars::prelude::chunkedarray::StringMethods
source · pub trait StringMethods: AsString {
// Provided methods
fn as_time(
&self,
fmt: Option<&str>,
use_cache: bool
) -> Result<Logical<TimeType, Int64Type>, PolarsError> { ... }
fn as_date_not_exact(
&self,
fmt: Option<&str>
) -> Result<Logical<DateType, Int32Type>, PolarsError> { ... }
fn as_datetime_not_exact(
&self,
fmt: Option<&str>,
tu: TimeUnit,
tz_aware: bool,
tz: Option<&String>,
_ambiguous: &ChunkedArray<StringType>
) -> Result<Logical<DatetimeType, Int64Type>, PolarsError> { ... }
fn as_date(
&self,
fmt: Option<&str>,
use_cache: bool
) -> Result<Logical<DateType, Int32Type>, PolarsError> { ... }
fn as_datetime(
&self,
fmt: Option<&str>,
tu: TimeUnit,
use_cache: bool,
tz_aware: bool,
tz: Option<&String>,
ambiguous: &ChunkedArray<StringType>
) -> Result<Logical<DatetimeType, Int64Type>, PolarsError> { ... }
}
Available on crate feature
temporal
only.Provided Methods§
sourcefn as_time(
&self,
fmt: Option<&str>,
use_cache: bool
) -> Result<Logical<TimeType, Int64Type>, PolarsError>
Available on crate feature dtype-time
only.
fn as_time( &self, fmt: Option<&str>, use_cache: bool ) -> Result<Logical<TimeType, Int64Type>, PolarsError>
dtype-time
only.Parsing string values and return a TimeChunked
sourcefn as_date_not_exact(
&self,
fmt: Option<&str>
) -> Result<Logical<DateType, Int32Type>, PolarsError>
Available on crate feature dtype-date
only.
fn as_date_not_exact( &self, fmt: Option<&str> ) -> Result<Logical<DateType, Int32Type>, PolarsError>
dtype-date
only.Parsing string values and return a DateChunked
Different from as_date
this function allows matches that not contain the whole string
e.g. “foo-2021-01-01-bar” could match “2021-01-01”
sourcefn as_datetime_not_exact(
&self,
fmt: Option<&str>,
tu: TimeUnit,
tz_aware: bool,
tz: Option<&String>,
_ambiguous: &ChunkedArray<StringType>
) -> Result<Logical<DatetimeType, Int64Type>, PolarsError>
Available on crate feature dtype-datetime
only.
fn as_datetime_not_exact( &self, fmt: Option<&str>, tu: TimeUnit, tz_aware: bool, tz: Option<&String>, _ambiguous: &ChunkedArray<StringType> ) -> Result<Logical<DatetimeType, Int64Type>, PolarsError>
dtype-datetime
only.Parsing string values and return a DatetimeChunked
Different from as_datetime
this function allows matches that not contain the whole string
e.g. “foo-2021-01-01-bar” could match “2021-01-01”
sourcefn as_date(
&self,
fmt: Option<&str>,
use_cache: bool
) -> Result<Logical<DateType, Int32Type>, PolarsError>
Available on crate feature dtype-date
only.
fn as_date( &self, fmt: Option<&str>, use_cache: bool ) -> Result<Logical<DateType, Int32Type>, PolarsError>
dtype-date
only.Parsing string values and return a DateChunked
sourcefn as_datetime(
&self,
fmt: Option<&str>,
tu: TimeUnit,
use_cache: bool,
tz_aware: bool,
tz: Option<&String>,
ambiguous: &ChunkedArray<StringType>
) -> Result<Logical<DatetimeType, Int64Type>, PolarsError>
Available on crate feature dtype-datetime
only.
fn as_datetime( &self, fmt: Option<&str>, tu: TimeUnit, use_cache: bool, tz_aware: bool, tz: Option<&String>, ambiguous: &ChunkedArray<StringType> ) -> Result<Logical<DatetimeType, Int64Type>, PolarsError>
dtype-datetime
only.Parsing string values and return a DatetimeChunked
.