jupyter-widgets-contrib / ipysheet

Jupyter handsontable integration
MIT License
543 stars 68 forks source link

Unable to render outside of a notebook context #217

Open cpsievert opened 2 years ago

cpsievert commented 2 years ago

The suggested way of getting standalong HTML from ipywidgets doesn't appear to work:

import numpy as np
import pandas as pd
from ipysheet import from_dataframe

dates = pd.date_range("20130101", periods=6)
df = pd.DataFrame(
    np.random.randn(6, 26),
    index=dates,
    columns=list(chr(ord("A") + i) for i in range(26)),
)

w = from_dataframe(df)

from ipywidgets.embed import embed_minimal_html

embed_minimal_html("index.html", w)
$ python3 -m http.server
Screen Shot 2021-11-30 at 10 06 05 AM