Home > database >  Display dataframe in a separate panel in Jupyter Lab
Display dataframe in a separate panel in Jupyter Lab

Time:12-31

I would like to display my dataframe in a seperate panel/window in Jupyter Lab. Currently, I can open .csv files in a separate window (which helps write code side-by-side to the data I'm working with), but I want to do this with active dataframes as well.

Is there a way to do this native to Jupyterlab, similar to how it is done in MATLAB? If not, what is the best way to do it otherwise?

CodePudding user response:

Yes. There are several ways:

  1. Display the data frame in a cell output, then right-click on the output and select Create New View for Output Create New View for Output1

  2. Use enter image description here

  3. (JupyterLab 3.3 ) Activate the visual debugger, go to variables list, hover over the variable and click on loop icon. debugger

You can combine approach (1) or (2) with IPython widgets to create an interactive explorer for larger data frames, such as this pandas_explorer snippet. There are other, more complete, interactive explorers which you can embed in a sidecar or move to the new output, for example ipydatagrid.

  • Related