altair-viz/jupyterlab_voyager

Open Pandas Dataframe

saulshanabrook opened this issue · 3 comments

A user should be able to open a Pandas dataframe they have in a notebook with Voyager.

The UI for this could be:

  • An option in the right click context menu on Pandas dataframe outputs outputs in a Notebook to open in Voyager.
  • A Python API to wrap a Pandas DF to tell Jupyter notebook to open it in Voyager (like Chart).

This might be able to be supported by telling Pandas to output a JSON table schemas and transforming that for Voyager.

I feel the Chart works pretty good already, we can think about modify the options under the graph
image

  • (Longer term feature) -- what if users want to further clean data in Panda and re-sync data to Voyager while maintaining the work session.

@zzhangjii mentioned to me in an email (relating to #19):

Another problem left is the restoration of Voyager panel widgets with Altair output or dataframe as data source: these data are from a notebook cell, not a file stored on hard disk, so currently these voyager widgets will be gone after refresh (I plan to create temporary files to solve this problem).

I wonder if it would be possible to save something in the state of the Voyager widget that refers to the cell or dataframe output. Then, when it is restored, it could lookup that reference and re-process the data.