DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
6+9 =
Submit