woodwork.table_accessor.WoodworkTableAccessor.rename#

WoodworkTableAccessor.rename(columns, inplace=False)[source]#

Renames columns in a DataFrame, maintaining Woodwork typing information.

Parameters:
  • columns (Dict[str -> str]) – A dictionary mapping current column names to new column names.

  • inplace (bool) – If False, return a copy. Otherwise, do operation inplace and return None.

Returns:

DataFrame with the specified columns renamed, maintaining Woodwork typing information or None if inplace=True. Only possible for pandas dataframes.

Return type:

DataFrame or None