polars.Expr.name.to_lowercase#
- Expr.name.to_lowercase() Expr [source]#
Make the root column name lowercase.
See also
Notes
Due to implementation constraints, this method can only be called as the last expression in a chain.
Examples
>>> df = pl.DataFrame( ... { ... "ColX": [1, 2, 3], ... "ColY": ["x", "y", "z"], ... } ... ) >>> df.with_columns(pl.all().name.to_lowercase()) shape: (3, 4) ┌──────┬──────┬──────┬──────┐ │ ColX ┆ ColY ┆ colx ┆ coly │ │ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ str ┆ i64 ┆ str │ ╞══════╪══════╪══════╪══════╡ │ 1 ┆ x ┆ 1 ┆ x │ │ 2 ┆ y ┆ 2 ┆ y │ │ 3 ┆ z ┆ 3 ┆ z │ └──────┴──────┴──────┴──────┘