While comparing two dataframes, I am highlighting and appending results in a separate column(in my example, it’s column C). Using apply
, you can see the output, but there is no way to export highlighted results directly. I am using xlsxwriter as a workaround. Is there a direct way to export highlighted results in excel or any other standard format using pandas?
Edit: I have added my code in the answer for reference.
A B C
120 ABC12 Exist
125 BCD45 Doesn’t Exist
456 YKR70 Exist
127 UKB67 Doesn’t Exist