2021-01-15
python – pandas create new column based on values from other columns / apply a function of multiple columns, row-wise

The Question : 375 people think this question is useful I want to apply my custom function (it uses an if-else ladder) to these six columns (ERI_Hispanic, ERI_AmerInd_AKNatv, ERI_Asian, ERI_Black_Afr.Amer, ERI_HI_PacIsl, ERI_White) in each row of my dataframe. I’ve tried different methods from other questions but still can’t seem to find the right answer for