Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add percentage column pandas

df['%'] = ((df['Code Lines'] / df['Code Lines'].sum())*100).round(2).astype(str) + '%'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #percentage #column #pandas
ADD COMMENT
Topic
Name
3+5 =