altair-viz / jupyterlab_voyager

JupyterLab extension visualize data with Voyager
BSD 3-Clause "New" or "Revised" License
298 stars 35 forks source link

Launch from pandas dataframe: website says possible, but can't find? #74

Open nickeubank opened 5 years ago

nickeubank commented 5 years ago

The Voyager docs current seem to suggest you can launch voyager from a pandas dataframe:

Screen Shot 2019-07-30 at 7 18 47 AM

But I can't find any guidance on how. Are the docs incorrect, or is there a hidden feature?

playermanny2 commented 5 years ago

@nickeubank this currently is a feature we're looking to add support for, but there's no timeline for when it would be released

playermanny2 commented 5 years ago

@nickeubank

Played around with this a bit...it seems this is possible currently with the functionality, however, you must enable pandas to support exporting the required data needed to jupyterlab.

Enable pandas using: pd.options.display.html.table_schema = True

It is set to False by default, and I'm not sure if the plan is to have it enabled out of the box from pandas side.

@saulshanabrook do you know any way from jupyter extension side to have this enabled by default? seems like it could only be accomplished if pandas enables it. Essentially, by enabling the pd.options.display.html.table_schema = True pandas will provide a JSON schema representation of the pandas dataframe application/vnd.dataresource+json to the data object which can be utilized by the extension

jupyter_lab_open_df_with_voyager