Trait polars::prelude::Utf8Methods
source · [−]pub trait Utf8Methods {
fn as_time(
&self,
fmt: Option<&str>
) -> 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
) -> Result<Logical<DatetimeType, Int64Type>, PolarsError>;
fn as_date(
&self,
fmt: Option<&str>
) -> Result<Logical<DateType, Int32Type>, PolarsError>;
fn as_datetime(
&self,
fmt: Option<&str>,
tu: TimeUnit
) -> Result<Logical<DatetimeType, Int64Type>, PolarsError>;
}
Required methods
Parsing string values and return a TimeChunked
fn as_date_not_exact(
&self,
fmt: Option<&str>
) -> Result<Logical<DateType, Int32Type>, PolarsError>
fn as_date_not_exact(
&self,
fmt: Option<&str>
) -> Result<Logical<DateType, Int32Type>, PolarsError>
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”
fn as_datetime_not_exact(
&self,
fmt: Option<&str>,
tu: TimeUnit
) -> Result<Logical<DatetimeType, Int64Type>, PolarsError>
fn as_datetime_not_exact(
&self,
fmt: Option<&str>,
tu: TimeUnit
) -> Result<Logical<DatetimeType, Int64Type>, PolarsError>
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”
Parsing string values and return a DateChunked
fn as_datetime(
&self,
fmt: Option<&str>,
tu: TimeUnit
) -> Result<Logical<DatetimeType, Int64Type>, PolarsError>
fn as_datetime(
&self,
fmt: Option<&str>,
tu: TimeUnit
) -> Result<Logical<DatetimeType, Int64Type>, PolarsError>
Parsing string values and return a DatetimeChunked