Examples

In [1]:
import numpy as np
import pandas as pd
In [2]:
s = pd.Series([2, 3, 4, 5])
s
Out[2]:
0    2
1    3
2    4
3    5
dtype: int64
In [3]:
s.add_suffix('_item')
Out[3]:
0_item    2
1_item    3
2_item    4
3_item    5
dtype: int64
In [4]:
df = pd.DataFrame({'P': [2, 3, 4, 5],  'Q': [4, 5, 6, 7]})
df
Out[4]:
P Q
0 2 4
1 3 5
2 4 6
3 5 7
In [5]:
df.add_suffix('_col')
Out[5]:
P_col Q_col
0 2 4
1 3 5
2 4 6
3 5 7