add percentage column pandas

Solutions on MaxInterview for add percentage column pandas by the best coders in the world

showing results for - "add percentage column pandas"
Sevan
05 Jun 2019
1df['%'] = ((df['Code Lines'] / df['Code Lines'].sum())*100).round(2).astype(str) + '%'