w3resource

Pandas DataFrame: add_suffix() function

DataFrame - add_suffix() function

The add_suffix() function is used to suffix labels with string suffix.

For Series, the row labels are suffixed. For DataFrame, the column labels are suffixed.

Syntax:

DataFrame.add_suffix(self, suffix)

Parameters:

Name Description Type/Default Value Required / Optional
suffix            

The string to add after each label.

 str Required

Returns: Series or DataFrame
New Series or DataFrame with updated labels.

Example:


Download the Pandas DataFrame Notebooks from here.

Previous: DataFrame - add_prefix() function
Next: DataFrame - at_time() function



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/pandas/dataframe/dataframe-add_suffix.php