polars.LazyFrame.columns#

property LazyFrame.columns: list[str][source]#

Get or set column names.

Examples

>>> df = (
...     pl.DataFrame(
...         {
...             "foo": [1, 2, 3],
...             "bar": [6, 7, 8],
...             "ham": ["a", "b", "c"],
...         }
...     )
...     .lazy()
...     .select(["foo", "bar"])
... )
>>> df.columns
['foo', 'bar']