

# Define a dictionary containing ICC ratings One way to rename columns in a Pandas dataframe is to use the rename () function. This method is very useful when we need to rename some of the selected columns, because we only need to provide information for the columns that need to be renamed. Method # 1: Using the rename () function. The DataFrame.rename() function takes the first parameter as a python dictionary with the keys as original column names and corresponding values as new desired names, for example here the label of the third column has been. Unlike a 2D array, the pandas data axes are labeled. In this method, we shall use the DataFrame.rename() function to rename column names in an existing Pandas DataFrame.


So every rename values which are mentioned here will be applied to the column names of. Columns: This is again an another alternative to the argument axis ( mapper, axis1 ), Here columns as the name suggest it represents the columns of the dataframe.
