Home > front end >  Convert pandas df to html table and apply color to pandas row based on a criteria
Convert pandas df to html table and apply color to pandas row based on a criteria

Time:05-19

I have a dataframe like as below

test_id,status,revenue,cnt_days,age     
1,passed,234.54,3,21          
2,passed,543.21,5,29
11,failed,21.3,4,35
15,failed,2098.21,6,57             
51,passed,232,21,80     
75,failed,123.87,32,43

df1 = pd.read_clipboard(sep=',')

I would like to color the rows when revenue is greater than 500. So, I used pretty_html_table found enter image description here

  • Related