pandas 0.7.0 documentation

pandas.DataFrame.rename

DataFrame.rename(index=None, columns=None, copy=True)

Alter index and / or columns using input function or functions. Function / dict values must be unique (1-to-1). Labels not contained in a dict / Series will be left as-is.

Parameters :

index : dict-like or function, optional

Transformation to apply to index values

columns : dict-like or function, optional

Transformation to apply to column values

copy : boolean, default True

Also copy underlying data

Returns :

renamed : DataFrame (new object)

See also

Series.rename