pandas new column average of other columns code example
Example: pandas new column average of other columns
col = df.loc[: , "salary_1":"salary_3"]
df['salary_mean'] = col.mean(axis=1)
col = df.loc[: , "salary_1":"salary_3"]
df['salary_mean'] = col.mean(axis=1)