How to Use Two Columns in an Apply Lambda Function
Python
1| df[new_col] = df.apply(lambda x: 1 if x.col1 > x.col2 else 0, axis=1)
116
104
103