-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving a Jupyter notebook as HTML does not save pandas dataframes #7465
Comments
Thank you, yes I agree. Right now, you can use the publication button make simple web pages (hosted HTML) with the live interactive table widgets. You can share the link with anyone. For the command line, we have a PR to help: Would be cool if just writing HTML would work too. |
Hello, I have been searching around for a solution to this Dataframe rendering issue for exporting as just HTML (not publishing to GIST). It appears the same problem happens with the general ipywidgets as well. A trick that I dont totally understand worked to get things to render is to export as an HTML, then change the header script calls from:
to this (which is the standard output html when you "embed Widgets"):
Note the change in ordering of the require.min.js and jupyter-related calls from the standard html. This find is based off this: Not sure if these issues were version related, but it was what pushed things over the edge for me after much toiling around. Now I have tables in html! |
Thank you @tcombes1 this works perfectly! |
After playing with this a bit more, I found that changing this line
to this
was enough to get this working. I didn't even need to update the require.js or swap the order. Without it however my error looked like this:
EDIT: After digging more into this it seems this is more because the changed line allows for embedding widgets in the HTML, I opened an issue for this so that hopefully this can be made the default when saving the widget state. |
For that incorrect script link, I'll link to the nbconvert PR that would fix this: jupyter/nbconvert#792 |
When we export a notebook at HTML outside of BeakerX, the dataframe tables are preserved. This makes sharing notebooks with people who do not have any coding experience very easy.
The interactive dataframes are not saved when we export to HTML.
The text was updated successfully, but these errors were encountered: