Black Lives Matter. Please consider donating to Black Girls Code today.

Dash table : Compare two columns and use style_data_conditional

I want to compare two string columns . I want the “Suggested Specification” column value to be red if the value of “Suggested Specification” == “Specification”

I have written this and its not running :

style_data_conditional=[       {
     'if': {'column_id': 'Suggested Specifications',
     'filter_query': '{Suggested Specifications} == {Specifications}'},  
    'backgroundColor': '#3D9970',
     'color': 'white'}]

It not working and following is the error :

unable to evaluate target: syntax tree is invalid for query={Suggested Specifications} == {Specifications}

Try '{Suggested Specifications} = {Specifications}'

I’ve run into this issue a bunch of times too, we should really just support both options :man_facepalming: Just made an issue :arrow_right: