Python | Pandas dataframe.add_suffix() Last Updated : 16 Nov, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report 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.add_suffix() function can be used with both series as well as dataframes. add_suffix() function Concatenate suffix string with panel items names. For Series, the row labels are suffixed. For DataFrame, the column labels are suffixed. Syntax: DataFrame.add_suffix(suffix) Parameters: suffix : string Returns: with_suffix: type of caller For link to CSV file Used in Code, click here Example #1: Suffix _col in each columns in the dataframe. Python3 1== # importing pandas as pd import pandas as pd # Making data frame from the csv file df = pd.read_csv("nba.csv") # Printing the first 10 rows of # the data frame for visualization df[:10] Python3 1== # Using add_suffix() function to # add '_col' in each column label df = df.add_suffix('_col') # Print the dataframe df Output: Example #2: Using add_suffix() with Series in pandas add_suffix() alters the row index labels in the case of series. Python3 1== # importing pandas as pd import pandas as pd # Creating a Series df = pd.Series([1, 2, 3, 4, 5, 10, 11, 21, 4]) # This will suffix '_Row' in # each row of the series df = df.add_suffix('_Row') # Print the Series df Output: Comment More infoAdvertise with us Next Article Python | Pandas Dataframe.rename() S Shubham__Ranjan Follow Improve Article Tags : Pandas Python-pandas Python pandas-dataFrame Pandas-DataFrame-Methods AI-ML-DS With Python +1 More Similar Reads Python - Pandas dataframe.append() Pandas append function is used to add rows of other dataframes to end of existing dataframe, returning a new dataframe object. Columns not in the original data frames are added as new columns and the new cells are populated with NaN value.Append Dataframe into another DataframeIn this example, we ar 4 min read Python | Pandas dataframe.add_prefix() 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.add_prefix() function can be used with both series as well as dataframes. Fo 2 min read Python | Pandas dataframe.applymap() 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.applymap() method applies a function that accepts and returns a scalar to ev 2 min read Python | Pandas Dataframe.rename() 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. Pandas rename() method is used to rename any index, column or row. Renaming of column 3 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.set_index() Pandas set_index() method is used to set one or more columns of a DataFrame as the index. This is useful when we need to modify or add new indices to our data as it enhances data retrieval, indexing and merging tasks. Setting the index is helpful for organizing the data more efficiently, especially 3 min read Like