polars.Expr.name.to_uppercase#

Expr.name.to_uppercase() Expr[source]#

Make the root column name uppercase.

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_uppercase())
shape: (3, 4)
┌──────┬──────┬──────┬──────┐
│ ColX ┆ ColY ┆ COLX ┆ COLY │
│ ---  ┆ ---  ┆ ---  ┆ ---  │
│ i64  ┆ str  ┆ i64  ┆ str  │
╞══════╪══════╪══════╪══════╡
│ 1    ┆ x    ┆ 1    ┆ x    │
│ 2    ┆ y    ┆ 2    ┆ y    │
│ 3    ┆ z    ┆ 3    ┆ z    │
└──────┴──────┴──────┴──────┘