Trait polars::prelude::Utf8NameSpaceImpl
source · [−]pub trait Utf8NameSpaceImpl: AsUtf8 {
Show 16 methods
fn str_lengths(&self) -> ChunkedArray<UInt32Type> { ... }
fn contains(
&self,
pat: &str
) -> Result<ChunkedArray<BooleanType>, PolarsError> { ... }
fn contains_literal(
&self,
lit: &str
) -> Result<ChunkedArray<BooleanType>, PolarsError> { ... }
fn ends_with(&self, sub: &str) -> ChunkedArray<BooleanType> { ... }
fn starts_with(&self, sub: &str) -> ChunkedArray<BooleanType> { ... }
fn replace(
&'a self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError> { ... }
fn replace_literal(
&self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError> { ... }
fn replace_all(
&self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError> { ... }
fn replace_literal_all(
&self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError> { ... }
fn extract(
&self,
pat: &str,
group_index: usize
) -> Result<ChunkedArray<Utf8Type>, PolarsError> { ... }
fn extract_all(
&self,
pat: &str
) -> Result<ChunkedArray<ListType>, PolarsError> { ... }
fn count_match(
&self,
pat: &str
) -> Result<ChunkedArray<UInt32Type>, PolarsError> { ... }
fn to_lowercase(&self) -> ChunkedArray<Utf8Type> { ... }
fn to_uppercase(&self) -> ChunkedArray<Utf8Type> { ... }
fn concat(&self, other: &ChunkedArray<Utf8Type>) -> ChunkedArray<Utf8Type> { ... }
fn str_slice(
&self,
start: i64,
length: Option<u64>
) -> Result<ChunkedArray<Utf8Type>, PolarsError> { ... }
}
Provided Methods
fn str_lengths(&self) -> ChunkedArray<UInt32Type>
fn str_lengths(&self) -> ChunkedArray<UInt32Type>
Get the length of the string values.
fn contains(&self, pat: &str) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn contains(&self, pat: &str) -> Result<ChunkedArray<BooleanType>, PolarsError>
Check if strings contain a regex pattern; take literal fast-path if no special chars and strlen <= 96 chars (otherwise regex faster).
fn contains_literal(
&self,
lit: &str
) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn contains_literal(
&self,
lit: &str
) -> Result<ChunkedArray<BooleanType>, PolarsError>
Check if strings contain a given literal
fn ends_with(&self, sub: &str) -> ChunkedArray<BooleanType>
fn ends_with(&self, sub: &str) -> ChunkedArray<BooleanType>
Check if strings ends with a substring
fn starts_with(&self, sub: &str) -> ChunkedArray<BooleanType>
fn starts_with(&self, sub: &str) -> ChunkedArray<BooleanType>
Check if strings starts with a substring
fn replace(
&'a self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
fn replace(
&'a self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
Replace the leftmost regex-matched (sub)string with another string; take fast-path for small (<= 32 chars) strings (otherwise regex faster).
fn replace_literal(
&self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
fn replace_literal(
&self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
Replace the leftmost literal (sub)string with another string
fn replace_all(
&self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
fn replace_all(
&self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
Replace all regex-matched (sub)strings with another string
fn replace_literal_all(
&self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
fn replace_literal_all(
&self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
Replace all matching literal (sub)strings with another string
fn extract(
&self,
pat: &str,
group_index: usize
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
fn extract(
&self,
pat: &str,
group_index: usize
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
Extract the nth capture group from pattern
fn extract_all(&self, pat: &str) -> Result<ChunkedArray<ListType>, PolarsError>
fn extract_all(&self, pat: &str) -> Result<ChunkedArray<ListType>, PolarsError>
Extract each successive non-overlapping regex match in an individual string as an array
fn count_match(&self, pat: &str) -> Result<ChunkedArray<UInt32Type>, PolarsError>
fn count_match(&self, pat: &str) -> Result<ChunkedArray<UInt32Type>, PolarsError>
Count all successive non-overlapping regex matches.
fn to_lowercase(&self) -> ChunkedArray<Utf8Type>
fn to_lowercase(&self) -> ChunkedArray<Utf8Type>
Modify the strings to their lowercase equivalent
fn to_uppercase(&self) -> ChunkedArray<Utf8Type>
fn to_uppercase(&self) -> ChunkedArray<Utf8Type>
Modify the strings to their uppercase equivalent
fn concat(&self, other: &ChunkedArray<Utf8Type>) -> ChunkedArray<Utf8Type>
fn concat(&self, other: &ChunkedArray<Utf8Type>) -> ChunkedArray<Utf8Type>
Concat with the values from a second Utf8Chunked
fn str_slice(
&self,
start: i64,
length: Option<u64>
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
fn str_slice(
&self,
start: i64,
length: Option<u64>
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
Slice the string values
Determines a substring starting from start
and with optional length length
of each of the elements in array
.
start
can be negative, in which case the start counts from the end of the string.