question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ValueError: ('widget type not understood', 'select')

See original GitHub issue

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:

  • Python version: 3.7.3
  • Environment: Jupyter Notebook (local, Firefox, Windows 10)
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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
AmauryLepicardcommented, Jun 16, 2020

Right now I’m using the notebook iframe version, which works fine:

profile.to_notebook_iframe()
0reactions
sbrugmancommented, Jul 15, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ValueError: ('widget type not understood', 'select') #493 - GitHub
Describe the bug. With a big Dataframe (64 columns, 10000 rows), trying to render the profile as a widget crashes with the following...
Read more >
Trouble creating dataframe using pandas: ValueError/data ...
I get the error "ValueError: Shape of passed values is (1, 58), ... and then I started getting the error "data type not...
Read more >
Changelog — pandas-profiling dev documentation - YData
ValueError : ('widget type not understood', 'select') [#493]. Fixed regression in working with pandas' nullable integers [#502].
Read more >
Plotly figurewidget overview in Python
Help on class FigureWidget in module plotly.graph_objs. ... autotypenumbers | Using "strict" a numeric string in trace data | is not converted to...
Read more >
flask_admin.form.fields — flask-admin 1.6.0 documentation
DateTimeField): """ Allows modifying the datetime format of a ... SelectField): """ `Select2 <https://github.com/ivaynberg/select2>`_ styled select widget.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found