altair-viz / jupyterlab_voyager

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

Bug!! when using notebook table as data-src for voyager extension #41

Closed zzhangjii closed 6 years ago

zzhangjii commented 6 years ago

Now nothing happens when clicking 'Open in Voyager' on notebook table, This bug showed up in recent jupyterlab versions (>0.32??)

The reason is that, Previously, the source data of the table is stored in cell's 'application/vnd.dataresource+json' field as JSON, but now, this field no longer exists. The original data only exists in 'text/plain' field as Strings I'm trying to make it work using the String form, but have trouble convert it to JSON pairs,

zzhangjii commented 6 years ago

Current solution is set up panda dataframe inside notebook, then the 'Open in Voyager' command in context menu will work properly

import pandas as pd
pd.set_option('display.html.table_schema', True)