You are viewing documentation about an older version (1.18.0). View latest version

modin.pandas.DataFrame.rename_axis¶

DataFrame.rename_axis(mapper=_NoDefault.no_default, *, index=_NoDefault.no_default, columns=_NoDefault.no_default, axis=0, copy=None, inplace=False)[source]¶

Set the name of the axis for the index or columns.

Parameters:
  • mapper (scalar, list-like, optional) – Value to set the axis name attribute.

  • index (scalar, list-like, dict-like or function, optional) –

    A scalar, list-like, dict-like or functions transformations to apply to that axis’ values.

    Use either mapper and axis to specify the axis to target with mapper, or index and/or columns.

  • columns (scalar, list-like, dict-like or function, optional) –

    A scalar, list-like, dict-like or functions transformations to apply to that axis’ values.

    Use either mapper and axis to specify the axis to target with mapper, or index and/or columns.

  • axis ({0 or 'index', 1 or 'columns'}, default 0) – The axis to rename.

  • copy (bool, default None) – Also copy underlying data. This parameter is ignored in Snowpark pandas.

  • inplace (bool, default False) – Modifies the object directly, instead of creating a new DataFrame.

Returns:

DataFrame, or None if inplace=True.

Return type:

DataFrame or None