Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyterlab Table dynamic output (sorting, filterung, ...)

Good evening everyone,

is there a way to dynamically display the output of a table (pandas dataframe) so that you can sort by a column in the output or filter a column?

I would have thought that this should be included in Jupyter by default, but I can't find a setting.

Maybe I just can't find such a setting, so I'm curious about your answers. :-)

like image 320
user860480 Avatar asked Oct 28 '25 14:10

user860480


1 Answers

There is an extension called qgrid.

Qgrid is a Jupyter notebook widget which uses SlickGrid to render pandas DataFrames within a Jupyter notebook. This allows you to explore your DataFrames with intuitive scrolling, sorting, and filtering controls, as well as edit your DataFrames by double clicking cells.

You can display your dataframe with widget, and sort, filter or even edit your data interactively.

import qgrid

qgrid_widget = qgrid.show_grid(dataframe, show_toolbar=True)
qgrid_widget

As of now (March, 2021), works with both jupyter lab: 3.0.10 and jupyter-notebook : 6.2.0

Example screenshot:

enter image description here

like image 59
Ibrahim Berber Avatar answered Oct 30 '25 10:10

Ibrahim Berber



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!