Use parentheses to enforce the desired operator precedence:
F.when( (df["col-1"]>0.0) & (df["col-2"]>0.0), 1).otherwise(0)
Use parentheses to enforce the desired operator precedence:
F.when( (df["col-1"]>0.0) & (df["col-2"]>0.0), 1).otherwise(0)