Class: Polars::NameExpr
- Inherits:
-
Object
- Object
- Polars::NameExpr
- Defined in:
- lib/polars/name_expr.rb
Overview
Namespace for expressions that operate on expression names.
Instance Method Summary collapse
-
#keep ⇒ Expr
Keep the original root name of the expression.
-
#map(&f) ⇒ Expr
Rename the output of an expression by mapping a function over the root name.
-
#prefix(prefix) ⇒ Expr
Add a prefix to the root column name of the expression.
-
#suffix(suffix) ⇒ Expr
Add a suffix to the root column name of the expression.
-
#to_lowercase ⇒ Expr
Make the root column name lowercase.
-
#to_uppercase ⇒ Expr
Make the root column name uppercase.
Instance Method Details
#keep ⇒ Expr
Due to implementation constraints, this method can only be called as the last expression in a chain.
Keep the original root name of the expression.
51 52 53 |
# File 'lib/polars/name_expr.rb', line 51 def keep Utils.wrap_expr(_rbexpr.name_keep) end |
#map(&f) ⇒ Expr
Rename the output of an expression by mapping a function over the root name.
80 81 82 |
# File 'lib/polars/name_expr.rb', line 80 def map(&f) Utils.wrap_expr(_rbexpr.name_map(f)) end |
#prefix(prefix) ⇒ Expr
Add a prefix to the root column name of the expression.
110 111 112 |
# File 'lib/polars/name_expr.rb', line 110 def prefix(prefix) Utils.wrap_expr(_rbexpr.name_prefix(prefix)) end |
#suffix(suffix) ⇒ Expr
Add a suffix to the root column name of the expression.
140 141 142 |
# File 'lib/polars/name_expr.rb', line 140 def suffix(suffix) Utils.wrap_expr(_rbexpr.name_suffix(suffix)) end |
#to_lowercase ⇒ Expr
Make the root column name lowercase.
167 168 169 |
# File 'lib/polars/name_expr.rb', line 167 def to_lowercase Utils.wrap_expr(_rbexpr.name_to_lowercase) end |
#to_uppercase ⇒ Expr
Make the root column name uppercase.
194 195 196 |
# File 'lib/polars/name_expr.rb', line 194 def to_uppercase Utils.wrap_expr(_rbexpr.name_to_uppercase) end |