Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
python column = sum of list of columns
Vincent Bechmann
Programming language:
Python
2021-05-23 10:00:54
0
Q:
python column = sum of list of columns
Ahsanul Irfan
Code:
Python
2021-06-08 04:20:09
list_of_my_columns = [
'Col A'
,
'Col E'
,
'Col Z'
] df[
'Sum'
] = df[list_of_my_columns].sum(axis=
1
)
0
Tags
python
list
sum
columns
Related
pandas python group by for one column and sum another column
sum all elements in a list python
python groupby sum single columns
sumif in python on a column and create new column
sum two columns pandas
how to sum only the even values in python
python add the sum of a list
python sum of list axes
how to add all values in a list python without using sum function
how to calculate the sum of a list in python
python how to sum columns of an array
how to sum a column in csv python using list in python
sum up list python
python sum of list
New to Communities?
Join the community