Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to sum certain columns row wise in python

df['total']=df.loc[:,list_name].sum(axis=1)
Comment

PREVIOUS NEXT
Code Example
Python :: input multiple values in python 
Python :: what does class meta do in django 
Python :: pandas count number missing values 
Python :: example of django template for forms 
Python :: python create list of specific length 
Python :: delete pandas column 
Python :: python sorted dictionary multiple keys 
Python :: convert float to integer pandas 
Python :: title() function in python 
Python :: django secure secret key 
Python :: corr pandas 
Python :: api testing with python 
Python :: try open file 
Python :: how to find the datatype of a dataframe in python 
Python :: exclude index column pandas 
Python :: check where bool in a list python 
Python :: how can item in list change in int in python 
Python :: python get stock prices 
Python :: pyautogui press 
Python :: list tuples and dictionary in python 
Python :: python requests response get text 
Python :: python letter to number in alphabet 
Python :: numpy matrix power 
Python :: get text selenium 
Python :: python repeting timer 
Python :: find substr within a str in python 
Python :: change dataframe value by index 
Python :: get instance of object python 
Python :: pytest multi thread 
Python :: append in a for loop python 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =