Struct ExprNameNameSpace
pub struct ExprNameNameSpace(/* private fields */);
Expand description
Specialized expressions for modifying the name of existing expressions.
Implementations§
§impl ExprNameNameSpace
impl ExprNameNameSpace
pub 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()
])
}
pub 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.
pub fn to_lowercase(self) -> Expr
pub fn to_lowercase(self) -> Expr
Update the root column name to use lowercase characters.
pub 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 + Sync + Send>, ) -> 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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