Skip to content

Tag: pandas.excelwriter

Coloring pivot table pandas dataframe

I have a pivot table created using pandas which looks like below: I want to apply color for the entire column based on account name starts with. Ex: If account name starts with “AA” color=yellow, if starts with “AB” then color = red How can I do that in python and save it into excel fi…