Trait polars_ops::prelude::Utf8NameSpaceImpl
source · pub trait Utf8NameSpaceImpl: AsUtf8 {
Show 18 methods
fn str_n_chars(&self) -> UInt32Chunked { ... }
fn str_lengths(&self) -> UInt32Chunked { ... }
fn contains(&self, pat: &str) -> PolarsResult<BooleanChunked> { ... }
fn contains_literal(&self, lit: &str) -> PolarsResult<BooleanChunked> { ... }
fn ends_with(&self, sub: &str) -> BooleanChunked { ... }
fn starts_with(&self, sub: &str) -> BooleanChunked { ... }
fn replace<'a>(&'a self, pat: &str, val: &str) -> PolarsResult<Utf8Chunked> { ... }
fn replace_literal(&self, pat: &str, val: &str) -> PolarsResult<Utf8Chunked> { ... }
fn replace_all(&self, pat: &str, val: &str) -> PolarsResult<Utf8Chunked> { ... }
fn replace_literal_all(
&self,
pat: &str,
val: &str
) -> PolarsResult<Utf8Chunked> { ... }
fn extract(&self, pat: &str, group_index: usize) -> PolarsResult<Utf8Chunked> { ... }
fn extract_all(&self, pat: &str) -> PolarsResult<ListChunked> { ... }
fn extract_all_many(&self, pat: &Utf8Chunked) -> PolarsResult<ListChunked> { ... }
fn count_match(&self, pat: &str) -> PolarsResult<UInt32Chunked> { ... }
fn to_lowercase(&self) -> Utf8Chunked { ... }
fn to_uppercase(&self) -> Utf8Chunked { ... }
fn concat(&self, other: &Utf8Chunked) -> Utf8Chunked { ... }
fn str_slice(
&self,
start: i64,
length: Option<u64>
) -> PolarsResult<Utf8Chunked> { ... }
}
strings
only.Provided Methods§
sourcefn str_n_chars(&self) -> UInt32Chunked
fn str_n_chars(&self) -> UInt32Chunked
Get the length of the string values as number of chars.
sourcefn str_lengths(&self) -> UInt32Chunked
fn str_lengths(&self) -> UInt32Chunked
Get the length of the string values as number of bytes.
sourcefn contains(&self, pat: &str) -> PolarsResult<BooleanChunked>
fn contains(&self, pat: &str) -> PolarsResult<BooleanChunked>
Check if strings contain a regex pattern; take literal fast-path if no special chars and strlen <= 96 chars (otherwise regex faster).
sourcefn contains_literal(&self, lit: &str) -> PolarsResult<BooleanChunked>
fn contains_literal(&self, lit: &str) -> PolarsResult<BooleanChunked>
Check if strings contain a given literal
sourcefn ends_with(&self, sub: &str) -> BooleanChunked
fn ends_with(&self, sub: &str) -> BooleanChunked
Check if strings ends with a substring
sourcefn starts_with(&self, sub: &str) -> BooleanChunked
fn starts_with(&self, sub: &str) -> BooleanChunked
Check if strings starts with a substring
sourcefn replace<'a>(&'a self, pat: &str, val: &str) -> PolarsResult<Utf8Chunked>
fn replace<'a>(&'a self, pat: &str, val: &str) -> PolarsResult<Utf8Chunked>
Replace the leftmost regex-matched (sub)string with another string; take fast-path for small (<= 32 chars) strings (otherwise regex faster).
sourcefn replace_literal(&self, pat: &str, val: &str) -> PolarsResult<Utf8Chunked>
fn replace_literal(&self, pat: &str, val: &str) -> PolarsResult<Utf8Chunked>
Replace the leftmost literal (sub)string with another string
sourcefn replace_all(&self, pat: &str, val: &str) -> PolarsResult<Utf8Chunked>
fn replace_all(&self, pat: &str, val: &str) -> PolarsResult<Utf8Chunked>
Replace all regex-matched (sub)strings with another string
sourcefn replace_literal_all(&self, pat: &str, val: &str) -> PolarsResult<Utf8Chunked>
fn replace_literal_all(&self, pat: &str, val: &str) -> PolarsResult<Utf8Chunked>
Replace all matching literal (sub)strings with another string
sourcefn extract(&self, pat: &str, group_index: usize) -> PolarsResult<Utf8Chunked>
fn extract(&self, pat: &str, group_index: usize) -> PolarsResult<Utf8Chunked>
Extract the nth capture group from pattern
sourcefn extract_all(&self, pat: &str) -> PolarsResult<ListChunked>
fn extract_all(&self, pat: &str) -> PolarsResult<ListChunked>
Extract each successive non-overlapping regex match in an individual string as an array
sourcefn extract_all_many(&self, pat: &Utf8Chunked) -> PolarsResult<ListChunked>
fn extract_all_many(&self, pat: &Utf8Chunked) -> PolarsResult<ListChunked>
Extract each successive non-overlapping regex match in an individual string as an array
sourcefn count_match(&self, pat: &str) -> PolarsResult<UInt32Chunked>
fn count_match(&self, pat: &str) -> PolarsResult<UInt32Chunked>
Count all successive non-overlapping regex matches.
sourcefn to_lowercase(&self) -> Utf8Chunked
fn to_lowercase(&self) -> Utf8Chunked
Modify the strings to their lowercase equivalent
sourcefn to_uppercase(&self) -> Utf8Chunked
fn to_uppercase(&self) -> Utf8Chunked
Modify the strings to their uppercase equivalent
sourcefn concat(&self, other: &Utf8Chunked) -> Utf8Chunked
fn concat(&self, other: &Utf8Chunked) -> Utf8Chunked
Concat with the values from a second Utf8Chunked
sourcefn str_slice(&self, start: i64, length: Option<u64>) -> PolarsResult<Utf8Chunked>
fn str_slice(&self, start: i64, length: Option<u64>) -> PolarsResult<Utf8Chunked>
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.