Answers for "calculate new column as the mean of other columns pandas based on series"

0

pandas new column average of other columns

col = df.loc[: , "salary_1":"salary_3"]
df['salary_mean'] = col.mean(axis=1)
Posted by: Guest on March-26-2021

Code answers related to "calculate new column as the mean of other columns pandas based on series"

Python Answers by Framework

Browse Popular Code Answers by Language