how to add string to all values of column in pandas

Solutions on MaxInterview for how to add string to all values of column in pandas by the best coders in the world

showing results for - "how to add string to all values of column in pandas"
Camila
11 May 2018
1>>> df = pd.DataFrame({'col':['a',0]})
2>>> df
3  col
40   a
51   0
6>>> df['col'] = 'str' + df['col'].astype(str)
7>>> df
8    col
90  stra
101  str0
11