Skip to main content
Version: 1.0.0

TableFrame.rename

def rename(mapping: dict[str, str]) -> TableFrame

Categories: projection

Rename columns from the TableFrame.

Examples

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
┌──────┬──────┐
│ i ┆ f │
------
│ i32 ┆ f64 │
╞══════╪══════╡
13.1
24.1
35.9
42.6
553.5
68.97
└──────┴──────┘
>>>
>>> tf.{"i": "index", "f": "amount"})
>>>
┌───────┬────────┐
│ index ┆ amount │
-----------
│ i32 ┆ f64 │
╞═══════╪════════╡
13.1
24.1
35.9
42.6
553.5
68.97
└───────┴────────┘