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: Arc<dyn Fn(&str) -> PlSmallStr + Send + Sync>, ) -> 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 !Freeze for ExprNameNameSpace
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more