DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
pandas new column average of other columns
col = df.loc[: , "salary_1":"salary_3"] df['salary_mean'] = col.mean(axis=1)
PREVIOUS
NEXT
Tagged:
#pandas
#column
#average
#columns
ADD COMMENT
Topic
COMMENT
Name
5+4 =
Submit