I have a data frame like this:
Product_ID Store_1_qty Store_2_qty Store_3_qty
A 10 20 10
B 10 10 10
C 10 10 20
I want to add one more column which says 'true' or 'false' if column Store_2_qty, Store_3_qty are both equal to Store_1_qty. However sometimes extra columns like Store_4_qty, Store_5_qty are added, for which again I need to compare all columns to Store_1_qty
I tried this, but it is returning all False in last column
result['match'] = np.where(result.iloc[:, 1] == result.iloc[:, :1].all(1), 'True', 'False')