For example, I have a dataframe that looks like this
category numbers
a 100
b 200
c 200
And I want to add a column that present their percentages(with the percentage symbol). So this is what I've tried
df['percentage'] = str(100 * df['numbers']/df['numbers'].sum()) + '%'
However, this would return a list of number
category numbers percentage
a 100 0 20.00 1 40.00 2 40.00 Name: numbers, dtype: float64%
b 200 0 20.00 1 40.00 2 40.00 Name: numbers, dtype: float64%
c 200 0 20.00 1 40.00 2 40.00 Name: numbers, dtype: float64%
What could I do to let it become 20% 40% 40%