Describe the bug
With a big Dataframe (64 columns, 10000 rows), trying to render the profile as a widget crashes with the following error:
ValueError: ('widget type not understood', 'select')
Based on following the source code in pandas_profiling\report\structure\report.py, line 229, it seems that the widget "select" is used if there will be more than 10 items. but this widget type isn't listedin the file pandas_profiling\report\presentation\flavours\widget\container.py, line 85, hence the ValueError.
To Reproduce
import numpy as np
import pandas as pd
from pandas_profiling import ProfileReport
df = pd.DataFrame(
np.random.rand(1000, 20),
columns=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n",
"o", "p", "q", "r", "s", "t"]
)
profile = ProfileReport(df, title="Pandas Profiling Report")
profile.to_widgets()
Version information:
Pip Freeze
astropy==4.0.1.post1
attrs==19.3.0
backcall==0.1.0
bleach==3.1.4
certifi==2020.4.5.2
chardet==3.0.4
colorama==0.4.3
confuse==1.1.0
cycler==0.10.0
decorator==4.4.2
defusedxml==0.6.0
entrypoints==0.3
htmlmin==0.1.12
idna==2.9
ImageHash==4.1.0
importlib-metadata==1.6.0
ipykernel==5.2.0
ipython==7.13.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
jedi==0.16.0
Jinja2==2.11.1
joblib==0.14.1
jsonschema==3.2.0
jupyter-client==6.1.2
jupyter-contrib-core==0.3.3
jupyter-contrib-nbextensions==0.5.1
jupyter-core==4.6.3
jupyter-highlight-selected-word==0.2.0
jupyter-latex-envs==1.4.6
jupyter-nbextensions-configurator==0.4.1
jupyterthemes==0.20.0
kiwisolver==1.2.0
lesscpy==0.14.0
llvmlite==0.32.1
lxml==4.5.0
MarkupSafe==1.1.1
matplotlib==3.2.1
missingno==0.4.2
mistune==0.8.4
nbconvert==5.6.1
nbformat==5.0.5
networkx==2.4
notebook==6.0.3
numba==0.49.1
numpy==1.18.2
object-detection==0.1
pandas==1.0.3
pandas-profiling==2.8.0
pandocfilters==1.4.2
parso==0.6.2
phik==0.10.0
pickleshare==0.7.5
Pillow==7.1.2
ply==3.11
prometheus-client==0.7.1
prompt-toolkit==3.0.5
Pygments==2.6.1
pyparsing==2.4.7
pyrsistent==0.16.0
python-dateutil==2.8.1
pytz==2019.3
PyWavelets==1.1.1
pywin32==227
pywinpty==0.5.7
PyYAML==5.3.1
pyzmq==19.0.0
requests==2.23.0
scikit-learn==0.22.2.post1
scipy==1.4.1
seaborn==0.10.1
Send2Trash==1.5.0
six==1.14.0
sklearn==0.0
tangled-up-in-unicode==0.0.6
terminado==0.8.3
testpath==0.4.4
tornado==6.0.4
tqdm==4.45.0
traitlets==4.3.3
urllib3==1.25.9
visions==0.4.4
wcwidth==0.1.9
webencodings==0.5.1
widgetsnbextension==3.5.1
xgboost==1.0.2
xlrd==1.2.0
zipp==3.1.0
How can I solve this issue?
Right now I'm using the notebook iframe version, which works fine:
```python
profile.to_notebook_iframe()
````
Fixed this, will be in the next release.
Nice! You guys rock!
On Sat, Jul 11, 2020, 01:19 Simon Brugman notifications@github.com wrote:
Fixed this, will be in the next release.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/pandas-profiling/pandas-profiling/issues/493#issuecomment-656947466,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALJ5LBX7JWSIQP7ZMTS4LRTR26VYTANCNFSM4NYR2AXQ
.
The v2.9.0rc1 release is out, and should resolve this issue.
Until this version is fully released, you can install it via pip in the following way:
pip install --pre -U pandas-profiling
It would be very helpful to know if the release candidate adequately solves the issue.
Most helpful comment
Right now I'm using the notebook iframe version, which works fine:
```python
profile.to_notebook_iframe()
````