Feb-28-2020, 03:22 PM
Hi,
I have below dataframe, I want to highlight P with green, F with red.
df:
I use below code,
giving below error:
AttributeError: 'DataFrame' object has no attribute 'conditional_format'
I have below dataframe, I want to highlight P with green, F with red.
df:
c1 c2 c3 A P na P B F F P C P P naand write to excel.
I use below code,
df.conditional_format('B2:D4', {'type': '2_color_scale'}) df.to_excel("output.xlsx", sheet_name=sheet1)
giving below error:
AttributeError: 'DataFrame' object has no attribute 'conditional_format'