Posts by Geraldo Fonseca • 33 points
1 post
-
3
votes1
answer42
viewsQ: Create a column filled with 0 or 1 based on other columns in Pandas
I have a data frame and need to fill a column with 0 or 1 based on the values of another 29 columns. If you have 1 in any of the columns 0 to 28 the column with Dor_leve receives 1, otherwise…