I would like to add a '%' symbol to the end of number in a column
df = pd.DataFrame({
'name': ['A', 'B', 'C'],
'value': [2.5, 3.6, 4.2]
})
Desired output:
name| value |
A | 2.5 % |
B | 3.6 % |
C | 4.2 % |
Attempt: (I was thinking on a Regex function or maybe Lambda)
df[["name", "value"]]=df[["value"]].astype(str).replace(r"(\d{2})", r"\1%", regex=True)