Struct polars_plan::dsl::ExprNameNameSpace
source · pub struct ExprNameNameSpace(/* private fields */);
Expand description
Specialized expressions for modifying the name of existing expressions.
Implementations§
source§impl ExprNameNameSpace
impl ExprNameNameSpace
sourcepub fn keep(self) -> Expr
pub fn keep(self) -> Expr
Keep the original root name
fn example(df: LazyFrame) -> LazyFrame {
df.select([
// even thought the alias yields a different column name,
// `keep` will make sure that the original column name is used
col("*").alias("foo").name().keep()
])
}
sourcepub fn map<F>(self, function: F) -> Expr
pub fn map<F>(self, function: F) -> Expr
Define an alias by mapping a function over the original root column name.
sourcepub fn to_lowercase(self) -> Expr
pub fn to_lowercase(self) -> Expr
Update the root column name to use lowercase characters.
sourcepub fn to_uppercase(self) -> Expr
pub fn to_uppercase(self) -> Expr
Update the root column name to use uppercase characters.
pub fn map_fields(self, function: FieldsNameMapper) -> Expr
Available on crate feature
dtype-struct
only.pub fn prefix_fields(self, prefix: &str) -> Expr
Available on crate feature
dtype-struct
only.pub fn suffix_fields(self, suffix: &str) -> Expr
Available on crate feature
dtype-struct
only.Auto Trait Implementations§
impl !RefUnwindSafe for ExprNameNameSpace
impl Send for ExprNameNameSpace
impl Sync for ExprNameNameSpace
impl Unpin for ExprNameNameSpace
impl !UnwindSafe for ExprNameNameSpace
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more