SyntaxFix
Write A Post
Hire A Developer
Questions
df['col'] = 'str' + df['col'].astype(str)
Example:
>>> df = pd.DataFrame({'col':['a',0]}) >>> df col 0 a 1 0 >>> df['col'] = 'str' + df['col'].astype(str) >>> df col 0 stra 1 str0