Setting the name of the axes in Pandas DataFrame Last Updated : 23 Jan, 2019 Comments Improve Suggest changes Like Article Like Report There are multiple operations which can be performed over the exes in Pandas. Let's see how to operate on row and column index with examples. For link to the CSV file used in the code, click here. Reset the name of the row index. Code #1 : We can reset the name of the DataFrame index by using df.index.name attribute. Python3 1== # importing pandas as pd import pandas as pd # read the csv file and create DataFrame df = pd.read_csv('nba.csv') # Visualize the dataframe print(df) Output : Python3 # set the index name df.index.name = 'Index_name' # Print the DataFrame print(df) Output : Code #2 : We can reset the name of the DataFrame index by using df.rename_axis() function. Python3 1== # importing pandas as pd import pandas as pd # read the csv file and create DataFrame df = pd.read_csv('nba.csv') # reset the index name df.rename_axis('Index_name', axis = 'rows') # Print the DataFrame print(df) Output : Reset the name of the column axes Code #1 : We can reset the name of the DataFrame column axes by using df.rename_axis() function. Python3 1== # importing pandas as pd import pandas as pd # read the csv file and create DataFrame df = pd.read_csv('nba.csv') # Visualize the dataframe print(df) Output : As we can see in the output, column axes of the df DataFrame does not have any name. So, we will set the name using df.rename_axis() function. Python3 # set the name of column axes df.rename_axis('Column_Index_name', axis = 'columns') # Print the DataFrame print(df) Output : Comment More infoAdvertise with us Next Article Python | Pandas DataFrame.axes S Shubham__Ranjan Follow Improve Article Tags : Pandas Python-pandas Python pandas-dataFrame Python pandas-indexing AI-ML-DS With Python +1 More Similar Reads Python | Pandas dataframe.rename_axis() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. dataframe.rename_axis() is used to rename the axes of the index or columns in datafram 2 min read Python | Pandas dataframe.rename_axis() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. dataframe.rename_axis() is used to rename the axes of the index or columns in datafram 2 min read Python | Pandas DataFrame.axes Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both row and column labels. It can be thought of as a dict-like container for Series objects. This is the primary data structure o 2 min read Python | Pandas DataFrame.axes Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both row and column labels. It can be thought of as a dict-like container for Series objects. This is the primary data structure o 2 min read Pandas Dataframe Rename Index To rename the index of a Pandas DataFrame, rename() method is most easier way to rename specific index values in a pandas dataFrame; allows to selectively change index names without affecting other values. Pythonimport pandas as pd data = {'Name': ['John', 'Alice', 'Bob', 'Eve'], 'Age': [25, 30, 22, 3 min read How to Plot a Dataframe using Pandas Pandas plotting is an interface to Matplotlib, that allows to generate high-quality plots directly from a DataFrame or Series. The .plot() method is the core function for plotting data in Pandas. Depending on the kind of plot we want to create, we can specify various parameters such as plot type (ki 8 min read Like