Number conditional formatting dash table

Hello.
Is there possibilty to format numbers with conditional?

What i want to achieve:

Year Data till 2020 Data from 2021
2016 bd nd
2018 bd nd
2021 nd bd

So if data is from 2021, year is 2021 and there is null i want to put ‘bd’ but if year value of is 2016 for data from 2021 i want to put ‘nd’.

Any idea?
Is it possible to combine number formatting with conditional formatting?
Cheers

Hi @Ciamciaramcia

I think the best way is work with this conditional in Pandas before sending to the data table.

hmm…
Type of this columns are floats. If i will change values to ‘nd’ column will change to str so i will not be able to format number then.
I need data to be numeric type.

Hey @Ciamciaramcia

See the section: Special characters like emoji, stars, checkmarks, circles in this link:

https://dash.plotly.com/datatable/conditional-formatting

Instead of using the emojis, use your options in the lambda formula.