maxframe.liteframe.LiteFrame.rename#
- LiteFrame.rename(columns)#
Rename columns in LiteFrame.
Applies a mapping of old column names to new names; columns not in the mapping keep their current name. Row order and data are unchanged.
- Parameters:
columns (dict) – Mapping
{old_name: new_name}describing the renames to apply.- Returns:
LiteFrame with renamed columns.
- Return type:
See also
LiteFrame.add_prefixPrefix all column labels.
LiteFrame.add_suffixSuffix all column labels.
Examples
>>> import maxframe.liteframe as mlf >>> lf = mlf.LiteFrame({'a': [1, 2, 3], 'b': [4, 5, 6]}) >>> result = lf.rename(columns={'a': 'x'}) >>> result.execute() x b 0 1 4 1 2 5 2 3 6