I have this table for example:
If your_pack_size is the same as competitor_pack_size, then your_measurement should not be the same as competitor_measurement
I would like to find the rows where this condition is broken (if any)
This is what I have tried already:
if (df_pr['your_pack_size'].any() == df_pr['competitor_pack_size'].any()):
print('your_pack_size is the same as competitor_pack_size')
print(df_pr.loc[df_pr['your_pack_size'].any() == df_pr['competitor_pack_size'].any()]['competitor_product_id'])
but I get an error. How can I print out the competitor_product_id where the condition is broken?
