Examples
import numpy as np import pandas as pd
s = pd.Series([2, 3, 4, 5]) s
0 2 1 3 2 4 3 5 dtype: int64
s.add_prefix('item_')
item_0 2 item_1 3 item_2 4 item_3 5 dtype: int64
df = pd.DataFrame({'P': [2, 3, 4, 5], 'Q': [4, 5, 6, 7]}) df
df.add_prefix('col_')