Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to sum certain columns row wise in python

df['total']=df.loc[:,list_name].sum(axis=1)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sum #columns #row #wise #python
ADD COMMENT
Topic
Name
2+4 =