I have the following simple data frame:
stores = ['a', 'a', 'b', 'b', 'b']
brands = ['Nike', 'Nike', 'Adidas', 'Nike', 'Adidas']
colours = ['Black', 'Black', 'White', 'Black', 'Black']
data = dict(stores=stores, brands=brands, colours=colours)
df = pd.DataFrame(data, columns=data.keys())
I'd like to query this using a list of columns and a corresponding list of values. For e.g.
columns = ['stores', 'brands']
values = ['a', 'Nike']
df[columns == values]
Is this possible?