Open rdataforge opened 1 year ago
Hi, thank you for your report. Can you post the actual code to reproduce the issue?
A simple notebook with two cells:
First cell
from sklearn import datasets
import pandas as pd
import ipywidgets as widgets
from ipywidgets import interactive, HTML
from IPython.display import display
age_list=[22,34,21,22,34,55,69]
sex_list=["M","F","M","F","M","F","F"]
score_list=[.33,.45,.23,.98,.23,.45,.55]
df=pd.DataFrame({"age": age_list, "sex":sex_list, "score":score_list})
def filter_df(age,sex):
"""prepare output from widget selection
"""
filtered_df = df.query(f"age=='{age}' or sex=='{sex}' ")
with report_out:
report_out.clear_output()
display(filtered_df)
age_drop = widgets.Dropdown(options=age_list, description='Age: ')
sex_drop = widgets.Dropdown(options=sex_list, description='Sex: ')
report_out = widgets.Output(layout={'border': '1px solid black'})
interactive(filter_df, age=age_drop, sex=sex_drop)
Second Cell
display(report_out)
I just tried using: voila 0.4.0 And the posted code is working fine:
Have you tried this in a freshly installed environment?
@trungleduc
Description
Defined a very simple notebook just loading a CSV and then filtering the resulting pandas dataframe using a couple of dropdown boxes. The notebook worked flawlessly. Then tried to export to HTML using Voila but an error arised
Reproduce
voila mynotebook.ipynb
Expected behavior
The browser is opened and the interactive notebook is rendered
Context
Troubleshoot Output
voila output
There was an error creating your Issue: body is too long, body is too long (maximum is 65536 characters).