hvplot icon indicating copy to clipboard operation
hvplot copied to clipboard

Interactive DataFrame not displaying properly in Jupyter Lab

Open Nick-Hemenway opened this issue 3 years ago • 4 comments

ALL software version info

hvplot: 0.8.2 python: 3.9.1 jupyterlab: 3.4.8

Description of expected behavior and the observed behavior

I create a pandas dataframe from a .csv file and then turn it into an interactive object. When I simply output the interactive dataframe, it renders incorrect (all of the columns are overlapping). Note that I covered up some of the data as it contains sensitive information.

Complete, minimal, self-contained example code that reproduces the issue

import pandas
import hvplot.pandas

df = pd.read_csv('test_data.csv')
idf = df.interactive()
idf

Stack traceback and/or browser JavaScript console output

Screenshots or screencasts of the bug in action

image

Nick-Hemenway avatar Nov 29 '22 21:11 Nick-Hemenway

I just realized that a lot of the examples shown in the docs contain an optional width argument that can be included to set the display width of the interactive dataframe. This fixed my issue.

Example:

idf = df.interactive(width=600)

I couldn't find a description of the acceptable parameters for the interactive accessor anywhere in the documentation though. If there is one, maybe someone could include that here in the comments before this issue get's closed.

Nick-Hemenway avatar Nov 29 '22 21:11 Nick-Hemenway

Agreed, we should document this. Also worth noting that this issue arises from limitations in the Bokeh layout engine. With Panel 1.0 we will update to Bokeh 3.0 which will no longer exhibit this issue.

philippjfr avatar Nov 30 '22 00:11 philippjfr

@philippjfr will Holoviews/Geoviews and HvPlot be updated at Panel 1.0 release or gradually afterwards?

itsgifnotjiff avatar May 31 '23 18:05 itsgifnotjiff

They should all be updated now, if you're encountering issues please report them.

philippjfr avatar May 31 '23 18:05 philippjfr