jupyter-naas / awesome-notebooks

A powerful data & AI notebook templates catalog: prompts, plugins, models, workflow automation, analytics, code snippets - following the IMO framework to be searchable and reusable in any context.
https://naas.ai/search
BSD 3-Clause "New" or "Revised" License
2.65k stars 447 forks source link

Dash - Create Datatable With Dropdown #1159

Closed jravenel closed 1 year ago

jravenel commented 2 years ago

Just a little improvement to the original work done. When the result is displayed it would be cool to have :

h1 - "Datatable with dropdown"

1/ full table using #h2 - "Full table display"

2/ filter table using #h2 - "Filtered table display"

where "option1 - filter col1" "option2 - filter on all columns" "option3 - filter on specific condition"

Samael71 commented 2 years ago

@FlorentLvr can you review?

eliasdabbas commented 2 years ago

I've written something that might be interesting for this.

A DataTable filter that provides a controller based on the data type of the column selected, e.g: float: RangeSlider datetime: DatePicker categorical: Dropdown with multi=True etc.

This is a simple demo of how it works:

https://www.youtube.com/watch?v=mO4r_vpezfQ

Here's the code for it:

https://community.plotly.com/t/show-and-tell-dashtable-filtering-by-columns-with-external-controls-sliders-dropdowns-inputs/22523/4?u=eliasdabbas

FlorentLvr commented 1 year ago

@jravenel, this templates has been created and merged in master: https://github.com/jupyter-naas/awesome-notebooks/blob/master/Dash/Dash_Create_Datatable_With_Dropdown.ipynb All good :)