I have a dataframe
df = pd.DataFrame(columns = ['id', 'name', 'age'])
df.loc[len(df), :] = [1, 'John', 21]
df.loc[len(df), :] = [2, 'Mary', 19]
df.loc[len(df), :] = [3, 'Ann', 27]
df.loc[len(df), :] = [4, 'Ben', 18]
I want to save it to excel file using xlsxwriter.
However, I want the age larger than 20 to be in red.
In other words, 21 and 27 should appear red in the excel file.
How to do it?
