I want to highlight the cells based on the values of another column in a dataframe. Like in the below example, I want to highlight the prodkey1 and product1 cells if the value of p1_ourproduct is equal to 1, and same for product 2 and 3.
How can I do that?
import pandas as pd
data = { 'prodkey1': [101,102,103,104,105],
'prdouct1': ['a','b','c','d','e'],
'prodkey2': [201,202,203,204,205],
'prdouct2': ['f','g','h','i','j'],
'prodkey3': [301,302,303,304,305],
'prdouct3': ['k','l','m','n','o'],
'p1_ourproduct': [1,0,1,0,0],
'p2_ourproduct': [0,0,1,1,0],
'p3_ourproduct': [0,1,0,0,1],
}
df = pd.DataFrame(data)

