0

I'm trying to create a custom jupyter widget that takes a pandas.dataframe as an input and simply renders a modified html version of the dataframe as an output. I'm stuck at the start in terms of defining a dataframe as the input for the widget

I have tried to follow the online examples and I think I would be fine with most string inputs to a widget, but I'm lost when trying a dataframe as an input

I just like to be able to pass a dataframe into my custom widget and validate that is is a dataframe

Quantipy
  • 3
  • 2

1 Answers1

0

You can do this using jp_proxy_widget. In fact it is almost implemented in this notebook:

https://nbviewer.jupyter.org/github/AaronWatters/jp_doodle/blob/master/notebooks/misc/In%20place%20html%20table%20update%20demo.ipynb

The implementation is more complex than you requested because it supports in-place updates of the table.

Please see https://github.com/AaronWatters/jp_proxy_widget The example notebook is from https://github.com/AaronWatters/jp_doodle

Aaron Watters
  • 2,784
  • 3
  • 23
  • 37