Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

[Python Dash Table] Conditionally highlight table rows

$
0
0

Hi
I am trying to format a table.
my dataframe is like

df = pd.DataFrame({
    'bid_qty': [1000, 100, 30], 
    'bid_price': [96, 95, 94], 
    'offer_price': [97, 99, 100],
    'offer_qty': [100, 213, 500], 
})

I want to highlight 'bid_qty' and 'bid_price' based on 'bid_qty' values. Higher qty corresponds to darker color.
Same rules applys to 'offer_qty' and 'offer_price'

Ideally the table should be like .
image

However, this specific case is not covered in documentation .
I followed the documentation but could only make it like
image
Is there anyway I can also higlight 'bid_price' and 'offer_price' following 'bid_qty' and `‘offer_qty’.

Can someone advise ?
Thanks !!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images