Identify the discrepancy between two headers(color the false value)

30 views Asked by At

I'm using below queries to identify the discrepancy between two headers and its working good but I need to color the false value in df1.

import pandas as pd

df1 = pd.read_excel('E:\\New folder\\New folder\\AOQ_Factual.xlsx', sheet_name='Sheet1', index_col=0)

df2 = pd.read_excel('E:\\New folder\\New folder\\Input_header.xlsx', sheet_name='Sheet1', index_col=1)

template_check = df.columns.values == df1.columns.values

Result:

array([False,  True,  False,  True,  True,  True,  True,  True,  True,
        True,  True,  True,  True,  True,  True,  True,  True,  True,
        True,  True,  True,  True,  True,  True,  True,  True,  True])
0

There are 0 answers