> This is not an in-place operation: it returns a style which you can then
> render.
>
> style = df.style.apply(function2, axis=1)
> html = style.render()
>
> appears to work.
After your suggestion, rows are properly colored, but now I have lost all table
lines, font is smaller...
Is there an o
> This is not an in-place operation: it returns a style which you can then
> render.
>
> style = df.style.apply(function2, axis=1)
> html = style.render()
>
> appears to work.
This was a missing link.
Thank you very very much Thomas.
Regards and best wishes.
--
https://mail.python.org/mailm
On 30/10/17 08:44, zljubi...@gmail.com wrote:
> Hi,
>
> the following code never applies style and I cannot figure out why.
> Can someone please help?
>
> import pandas as pd
>
> def function2(row):
> if row.A == True:
> color = '#FF'
> else:
> color = '#00FF00'
>
>