I have many columns with true and false value. I wanna make a new column with value 1 if 2 columns are true and 0 otherwise.
col1 col2 col3
true false true
true true true
false true false
output: filter data if col1 and col2 are true: df.filter((df.col(col1)==true) & (df.col(col2)==true))
col1 col2 col3 R
true false true 0
true true false 1
false true false 0