# How to rename columns in Pandas DataFrame in Python # Import pandas packageimport pandas as pd   # Define a dictionary containing ICC rankingsrankings = {'test': ['India', 'South Africa', 'England',                            'New Zealand', 'Australia'],              'odi': ['England', 'India', 'New Zealand',                            'South Africa', 'Pakistan'],               't20': ['Pakistan', 'India', 'Australia',                              'England', 'New Zealand']}   # Convert the dictionary into DataFramerankings_pd = pd.DataFrame(rankings)   # Before renaming the columnsprint(rankings_pd)   rankings_pd.rename(columns = {'test':'TEST'}, inplace = True)   # After renaming the columnsprint("\nAfter modifying first column:\n", rankings_pd.columns)