I have a dataframe df_matching that I want to get when 2 columns is not matching at certain values using xor operator so
While this code works:
df_matching.query('(group == "treatment" and landing_page != "new_page") or (group != "treatment" and landing_page == "new_page")')
This code doesn't:
df_matching.query('(group == "treatment") ^ (landing_page == "new_page")')
Although all the searches leads that XOR operator in python is "^" and I know that XOR in SQL is XOR but neither works. What is the best way to put XOR in df.query()?