Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python column = sum of list of columns

list_of_my_columns = ['Col A', 'Col E', 'Col Z']
df['Sum'] = df[list_of_my_columns].sum(axis=1)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #column #sum #list #columns
ADD COMMENT
Topic
Name
6+9 =