I'm using Python 3 to send a report by mail. In the mail's body goes a table in HTML format.
To format this table, I've used the pretty_html_table library. I'm trying to keep the format given by this library, but colour green for positives, red for negatives and keep black for 0's and NaN ONLY in a specific column (%VAR in the example)
This is my current output without coulouring:
and this is what I'm trying to get:
Sample Code:
import pandas as pd
from pretty_html_table import build_table
raw_table = pd.read_excel(r"C:\Users\asd\Desktop\Prueba Colores.xlsx")
uncouloured_html_bridge = build_table(raw_table, 'blue_dark')
#Fixed some spacing problem
uncouloured_html=uncouloured_html_bridge.replace('\n','')