Created
March 10, 2019 22:17
-
-
Save davidcomfort/4a066fc14d76e703b27b49345601ade7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dash_table.DataTable( | |
data=df.to_dict('rows'), | |
columns=[ | |
{'name': i, 'id': i} for i in df.columns | |
], | |
style_data_conditional=[ | |
{ | |
'if': { | |
'column_id': 'Region', | |
'filter': 'Region eq "Montreal"' | |
}, | |
'backgroundColor': '#3D9970', | |
'color': 'white', | |
}, | |
{ | |
'if': { | |
'column_id': 'Humidity', | |
'filter': 'Humidity eq num(20)' | |
}, | |
'backgroundColor': '#3D9970', | |
'color': 'white', | |
}, | |
{ | |
'if': { | |
'column_id': 'Temperature', | |
'filter': 'Temperature > num(3.9)' | |
}, | |
'backgroundColor': '#3D9970', | |
'color': 'white', | |
}, | |
] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment