Closed yancyrafael closed 3 years ago
Hi @yancyrafael welcome! Could you provide more information such as which version of pandas-profiling you are using and which kind of dataset?
Hello I'm running the dataset on the tutorial
df = pd.DataFrame( np.random.rand(100, 5), columns=["a", "b", "c", "d", "e"])
Pandas version: 1.2.0 Pandas Profile version: 2.9.0
Using that exact same configuration the package works on this machine. Which environment you are using:
conda info
)pip freeze > packages.txt
or conda list
)Windows 10
Running Anaconda
python 3.7.4
conda 4.9.2
jupyter 1.0.0
active environment : base
active env location : D:\Anaconda
shell level : 1
user config file : C:\Users\Yancy.condarc
populated config files : C:\Users\Yancy.condarc
conda version : 4.9.2
conda-build version : 3.18.9
python version : 3.7.4.final.0
virtual packages : cuda=9.1=0
win=0=0
__archspec=1=x86_64
base environment : D:\Anaconda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
https://conda.anaconda.org/conda-forge/win-64
https://conda.anaconda.org/conda-forge/noarch
package cache : D:\Anaconda\pkgs
C:\Users\Yancy.conda\pkgs
C:\Users\Yancy\AppData\Local\conda\conda\pkgs
envs directories : D:\Anaconda\envs
C:\Users\Yancy.conda\envs
C:\Users\Yancy\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.9.2 requests/2.22.0 CPython/3.7.4 Windows/10 Windows/10.0.18362
administrator : False
netrc file : None
offline mode : False
(base) PS C:\Users\Yancy> conda list
#
_ipyw_jlab_nb_ext_conf 0.1.0 py37_0 alabaster 0.7.12 py37_0 anaconda 2019.10 py37_0 anaconda-client 1.7.2 py37_0 anaconda-navigator 1.10.0 py37_0 anaconda-project 0.8.3 py_0 asn1crypto 1.0.1 py37_0 astroid 2.3.1 py37_0 astropy 3.2.1 py37he774522_0 atomicwrites 1.3.0 py37_1 attrs 19.2.0 py_0 babel 2.7.0 py_0 backcall 0.1.0 py37_0 backports 1.0 py_2 backports.functools_lru_cache 1.6.1 pyhd3eb1b0_0 backports.os 0.1.1 py37_0 backports.shutil_get_terminal_size 1.0.0 py37_2 backports.tempfile 1.0 py_1 backports.weakref 1.0.post1 py_1 beautifulsoup4 4.8.0 py37_0 bitarray 1.0.1 py37he774522_0 bkcharts 0.2 py37_0 blas 1.0 mkl bleach 3.1.0 py37_0 blosc 1.16.3 h7bd577a_0 bokeh 1.3.4 py37_0 boto 2.49.0 py37_0 bottleneck 1.2.1 py37h452e1ab_1 bzip2 1.0.8 he774522_0 ca-certificates 2019.8.28 0 certifi 2019.9.11 py37_0 conda-forge/label/cf202003 cffi 1.12.3 py37h7a1dbc1_0 chardet 3.0.4 py37_1003 click 7.0 py37_0 cloudpickle 1.2.2 py_0 clyent 1.2.2 py37_1 colorama 0.4.1 py37_0 comtypes 1.1.7 py37_0 conda 4.9.2 py37h03978a9_0 conda-forge conda-build 3.18.9 py37_3 conda-env 2.6.0 1 conda-package-handling 1.7.2 py37h76e460a_0 conda-verify 3.4.2 py_1 confuse 1.4.0 pypi_0 pypi console_shortcut 0.1.1 3 contextlib2 0.6.0 py_0 cryptography 2.7 py37h7a1dbc1_0 curl 7.65.3 h2a8f88b_0 cycler 0.10.0 py37_0 cython 0.29.13 py37ha925a31_0 cytoolz 0.10.0 py37he774522_0 dask 2.5.2 py_0 dask-core 2.5.2 py_0 decorator 4.4.0 py37_1 defusedxml 0.6.0 py_0 distributed 2.5.2 py_0 docutils 0.15.2 py37_0 entrypoints 0.3 py37_0 et_xmlfile 1.0.1 py37_0 fastcache 1.1.0 py37he774522_0 filelock 3.0.12 py_0 flask 1.1.1 py_0 freetype 2.9.1 ha9979f8_1 fsspec 0.5.2 py_0 future 0.18.2 py37_1 get_terminal_size 1.0.0 h38e98db_0 gevent 1.4.0 py37he774522_0 glob2 0.7 py_0 greenlet 0.4.15 py37hfa6e2cd_0 h5py 2.9.0 py37h5e291fa_0 hdf5 1.10.4 h7ebc959_0 heapdict 1.0.1 py_0 html5lib 1.0.1 py37_0 htmlmin 0.1.12 py_1 conda-forge/label/cf202003 icc_rt 2019.0.0 h0cc432a_1 icu 58.2 ha66f8fd_1 idna 2.8 py37_0 imageio 2.6.0 py37_0 imagesize 1.1.0 py37_0 importlib_metadata 0.23 py37_0 intel-openmp 2019.4 245 ipykernel 5.1.2 py37h39e3cac_0 ipython 7.8.0 py37h39e3cac_0 ipython_genutils 0.2.0 py37_0 ipywidgets 7.5.1 py_0 conda-forge isort 4.3.21 py37_0 itsdangerous 1.1.0 py37_0 jdcal 1.4.1 py_0 jedi 0.15.1 py37_0 jinja2 2.10.3 py_0 joblib 0.13.2 py37_0 jpeg 9b hb83a4c4_2 json5 0.8.5 py_0 jsonschema 3.0.2 py37_0 jupyter 1.0.0 py37_7 jupyter-contrib-core 0.3.3 pypi_0 pypi jupyter-contrib-nbextensions 0.5.1 pypi_0 pypi jupyter-highlight-selected-word 0.2.0 pypi_0 pypi jupyter-latex-envs 1.4.6 pypi_0 pypi jupyter-nbextensions-configurator 0.4.1 pypi_0 pypi jupyter-notebook-gist 0.5.0 pypi_0 pypi jupyter_client 5.3.3 py37_1 jupyter_console 6.0.0 py37_0 jupyter_core 4.5.0 py_0 jupyterlab 1.1.4 pyhf63ae98_0 jupyterlab_server 1.0.6 py_0 jupyterthemes 0.20.0 pypi_0 pypi keyring 18.0.0 py37_0 kiwisolver 1.1.0 py37ha925a31_0 krb5 1.16.1 hc04afaa_7 lazy-object-proxy 1.4.2 py37he774522_0 lesscpy 0.14.0 pypi_0 pypi libarchive 3.3.3 h0643e63_5 libcurl 7.65.3 h2a8f88b_0 libiconv 1.15 h1df5818_7 liblief 0.9.0 ha925a31_2 libpng 1.6.37 h2a8f88b_0 libsodium 1.0.16 h9d3ae62_0 libssh2 1.8.2 h7a1dbc1_0 libtiff 4.0.10 hb898794_2 libxml2 2.9.9 h464c3ec_0 libxslt 1.1.33 h579f668_0 llvmlite 0.29.0 py37ha925a31_0 locket 0.2.0 py37_1 lxml 4.4.1 py37h1350720_0 lz4-c 1.8.1.2 h2fa13f4_0 lzo 2.10 h6df0209_2 m2w64-gcc-libgfortran 5.3.0 6 m2w64-gcc-libs 5.3.0 7 m2w64-gcc-libs-core 5.3.0 7 m2w64-gmp 6.1.0 2 m2w64-libwinpthread-git 5.0.0.4634.697f757 2 markupsafe 1.1.1 py37he774522_0 matplotlib 3.1.1 py37hc8f65d3_0 matplotlib-base 3.2.1 py37h911224e_0 conda-forge/label/cf202003 mccabe 0.6.1 py37_1 menuinst 1.4.16 py37he774522_0 missingno 0.4.2 py_1 conda-forge/label/cf202003 mistune 0.8.4 py37he774522_0 mkl 2019.4 245 mkl-service 2.3.0 py37hb782905_0 mkl_fft 1.0.14 py37h14836fe_0 mkl_random 1.1.0 py37h675688f_0 mock 3.0.5 py37_0 more-itertools 7.2.0 py37_0 mpmath 1.1.0 py37_0 msgpack-python 0.6.1 py37h74a9793_1 msys2-conda-epoch 20160418 1 multipledispatch 0.6.0 py37_0 navigator-updater 0.2.1 py37_0 nb_conda 2.2.1 py37_0 nb_conda_kernels 2.3.1 py37haa95532_0 nbconvert 5.6.0 py37_1 nbformat 4.4.0 py37_0 networkx 2.3 py_0 nltk 3.4.5 py37_0 nose 1.3.7 py37_2 notebook 6.0.1 py37_0 numba 0.45.1 py37hf9181ef_0 numexpr 2.7.0 py37hdce8814_0 numpy 1.16.5 pypi_0 pypi numpydoc 0.9.1 py_0 olefile 0.46 py37_0 openpyxl 3.0.0 py_0 openssl 1.1.1d he774522_2 packaging 19.2 py_0 pandas 1.2.0 pypi_0 pypi pandas-profiling 2.4.0 py_1 conda-forge/label/cf202003 pandoc 2.2.3.2 0 pandocfilters 1.4.2 py37_1 parso 0.5.1 py_0 partd 1.0.0 py_0 path.py 12.0.1 py_0 pathlib2 2.3.5 py37_0 patsy 0.5.1 py37_0 pep8 1.7.1 py37_0 phik 0.9.8 py_0 conda-forge/label/cf202003 pickleshare 0.7.5 py37_0 pillow 6.2.0 py37hdc69c19_0 pip 19.2.3 py37_0 pkginfo 1.5.0.1 py37_0 pluggy 0.13.0 py37_0 ply 3.11 py37_0 powershell_shortcut 0.0.1 2 prometheus_client 0.7.1 py_0 prompt_toolkit 2.0.10 py_0 psutil 5.6.3 py37he774522_0 py 1.8.0 py37_0 py-lief 0.9.0 py37ha925a31_2 pycodestyle 2.5.0 py37_0 pycosat 0.6.3 py37hfa6e2cd_0 pycparser 2.19 py37_0 pycrypto 2.6.1 py37hfa6e2cd_9 pycurl 7.43.0.3 py37h7a1dbc1_0 pyflakes 2.1.1 py37_0 pygments 2.4.2 py_0 pylint 2.4.2 py37_0 pyodbc 4.0.27 py37ha925a31_0 pyopenssl 19.0.0 py37_0 pyparsing 2.4.7 pypi_0 pypi pyqt 5.9.2 py37h6538335_2 pyreadline 2.1 py37_1 pyrsistent 0.15.4 py37he774522_0 pysocks 1.7.1 py37_0 pytables 3.5.2 py37h1da0976_1 pytest 5.2.1 py37_0 pytest-arraydiff 0.3 py37h39e3cac_0 pytest-astropy 0.5.0 py37_0 pytest-doctestplus 0.4.0 py_0 pytest-openfiles 0.4.0 py_0 pytest-pylint 0.14.1 py_0 conda-forge/label/cf202003 pytest-remotedata 0.3.2 py37_0 pytest-runner 5.2 py_0 conda-forge/label/cf202003 python 3.7.4 h5263a28_0 python-dateutil 2.8.1 pypi_0 pypi python-libarchive-c 2.8 py37_13 python_abi 3.7 1_cp37m conda-forge pytz 2019.3 py_0 pywavelets 1.0.3 py37h8c2d366_1 pywin32 223 py37hfa6e2cd_1 pywinpty 0.5.5 py37_1000 pyyaml 5.1.2 py37he774522_0 pyzmq 18.1.0 py37ha925a31_0 qt 5.9.7 vc14h73c81de_0 qtawesome 0.6.0 py_0 qtconsole 4.5.5 py_0 qtpy 1.9.0 py_0 requests 2.22.0 py37_0 rope 0.14.0 py_0 ruamel_yaml 0.15.46 py37hfa6e2cd_0 scikit-image 0.15.0 py37ha925a31_0 scikit-learn 0.21.3 py37h6288b17_0 scipy 1.6.0 pypi_0 pypi seaborn 0.9.0 py37_0 send2trash 1.5.0 py37_0 setuptools 41.4.0 py37_0 simplegeneric 0.8.1 py37_2 singledispatch 3.4.0.3 py37_0 sip 4.19.8 py37h6538335_0 six 1.15.0 pypi_0 pypi snappy 1.1.7 h777316e_3 snowballstemmer 2.0.0 py_0 sortedcollections 1.1.2 py37_0 sortedcontainers 2.1.0 py37_0 soupsieve 1.9.3 py37_0 sphinx 2.2.0 py_0 sphinxcontrib 1.0 py37_1 sphinxcontrib-applehelp 1.0.1 py_0 sphinxcontrib-devhelp 1.0.1 py_0 sphinxcontrib-htmlhelp 1.0.2 py_0 sphinxcontrib-jsmath 1.0.1 py_0 sphinxcontrib-qthelp 1.0.2 py_0 sphinxcontrib-serializinghtml 1.1.3 py_0 sphinxcontrib-websupport 1.1.2 py_0 spyder 3.3.6 py37_0 spyder-kernels 0.5.2 py37_0 sqlalchemy 1.3.9 py37he774522_0 sqlite 3.30.0 he774522_0 statsmodels 0.10.1 py37h8c2d366_0 sympy 1.4 py37_0 tangled-up-in-unicode 0.0.6 pypi_0 pypi tbb 2019.4 h74a9793_0 tblib 1.4.0 py_0 terminado 0.8.2 py37_0 testpath 0.4.2 py37_0 tk 8.6.8 hfa6e2cd_0 toolz 0.10.0 py_0 tornado 6.0.3 py37he774522_0 tqdm 4.36.1 py_0 traitlets 4.3.3 py37_0 unicodecsv 0.14.1 py37_0 urllib3 1.24.2 py37_0 vc 14.1 h0510ff6_4 vs2015_runtime 14.16.27012 hf0eaf9b_0 wcwidth 0.1.7 py37_0 webencodings 0.5.1 py37_1 werkzeug 0.16.0 py_0 wheel 0.33.6 py37_0 widgetsnbextension 3.5.1 py37_0 win_inet_pton 1.1.0 py37_0 win_unicode_console 0.5 py37_0 wincertstore 0.2 py37_0 winpty 0.4.3 4 wrapt 1.11.2 py37he774522_0 xlrd 1.2.0 py37_0 xlsxwriter 1.2.1 py_0 xlwings 0.15.10 py37_0 xlwt 1.3.0 py37_0 xmltodict 0.12.0 py_0 xz 5.2.4 h2fa13f4_4 yaml 0.1.7 hc54c509_2 zeromq 4.3.1 h33f27b4_3 zict 1.0.0 py_0 zipp 0.6.0 py_0 zlib 1.2.11 h62dcd97_3 zstd 1.3.7 h508b16e_0
@yancyrafael The issue is that you're running pandas-profiling v2.4.0 instead of 2.9.0 as reported!
The easiest solution is to reinstall, or start with a clean virtual environment
reinstall anaconda or pandas profiling?
I tried everything yesterday for an upgrade and seems not to work.
Does the following work for you?
conda install -c conda-forge pandas-profiling=2.9.0
Other resources:
Hello now is version pandas-profiling 2.9.0 pyh9f0ad1d_0 conda-forge Thanks
Start working and now has this error:
TypeError Traceback (most recent call last) D:\Anaconda\lib\site-packages\IPython\core\formatters.py in call(self, obj) 343 method = get_real_method(obj, self.print_method) 344 if method is not None: --> 345 return method() 346 return None 347 else:
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in _reprhtml(self) 407 def _reprhtml(self): 408 """The ipython notebook widgets user interface gets called by the jupyter notebook.""" --> 409 self.to_notebook_iframe() 410 411 def repr(self):
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in to_notebook_iframe(self) 387 with warnings.catch_warnings(): 388 warnings.simplefilter("ignore") --> 389 display(get_notebook_iframe(self)) 390 391 def to_widgets(self):
D:\Anaconda\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\notebook.py in get_notebook_iframe(profile) 63 output = get_notebook_iframe_src(profile) 64 elif attribute == "srcdoc": ---> 65 output = get_notebook_iframe_srcdoc(profile) 66 else: 67 raise ValueError(
D:\Anaconda\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\notebook.py in get_notebook_iframe_srcdoc(profile) 21 width = config["notebook"]["iframe"]["width"].get(str) 22 height = config["notebook"]["iframe"]["height"].get(str) ---> 23 src = html.escape(profile.to_html()) 24 25 iframe = f''
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in to_html(self) 357 358 """ --> 359 return self.html 360 361 def to_json(self) -> str:
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in html(self) 177 def html(self): 178 if self._html is None: --> 179 self._html = self._render_html() 180 return self._html 181
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in _render_html(self) 284 from pandas_profiling.report.presentation.flavours import HTMLReport 285 --> 286 report = self.report 287 288 disable_progress_bar = not config["progress_bar"].get(bool)
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in report(self) 171 def report(self): 172 if self._report is None: --> 173 self._report = get_report_structure(self.description_set) 174 return self._report 175
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in description_set(self) 152 def description_set(self): 153 if self._description_set is None: --> 154 self._description_set = describe_df(self.title, self.df, self._sample) 155 return self._description_set 156
D:\Anaconda\lib\site-packages\pandas_profiling\model\describe.py in describe(title, df, sample) 110 # missing diagrams 111 pbar.set_postfix_str("Get missing diagrams") --> 112 missing = get_missing_diagrams(df, table_stats) 113 pbar.update() 114
D:\Anaconda\lib\site-packages\pandas_profiling\model\summary.py in get_missing_diagrams(df, table_stats) 670 missing[name] = { 671 "name": settings["name"], --> 672 "matrix": missing_diagram(name)(df), 673 } 674 except ValueError as e:
D:\Anaconda\lib\contextlib.py in inner(*args, kwds) 72 def inner(*args, *kwds): 73 with self._recreate_cm(): ---> 74 return func(args, kwds) 75 return inner 76
D:\Anaconda\lib\site-packages\pandas_profiling\visualisation\missing.py in missing_matrix(data) 53 ) 54 plt.subplots_adjust(left=0.1, right=0.9, top=0.7, bottom=0.2) ---> 55 return plot_360_n0sc0pe(plt) 56 57
D:\Anaconda\lib\site-packages\pandas_profiling\visualisation\utils.py in plot_360_n0sc0pe(plt, image_format, attempts) 66 if image_format == "svg": 67 image_str = StringIO() ---> 68 plt.savefig(image_str, format=image_format) 69 image_str.seek(0) 70 result_string = image_str.getvalue()
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\pyplot.py in savefig(*args, kwargs) 857 def savefig(*args, *kwargs): 858 fig = gcf() --> 859 res = fig.savefig(args, kwargs) 860 fig.canvas.draw_idle() # need this if 'transparent=True' to reset colors 861 return res
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\figure.py in savefig(self, fname, transparent, kwargs) 2309 patch.set_edgecolor('none') 2310 -> 2311 self.canvas.print_figure(fname, kwargs) 2312 2313 if transparent:
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, bbox_inches, pad_inches, bbox_extra_artists, backend, kwargs) 2215 orientation=orientation, 2216 bbox_inches_restore=_bbox_inches_restore, -> 2217 kwargs) 2218 finally: 2219 if bbox_inches and restore_bbox:
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\backends\backend_svg.py in print_svg(self, filename, *args, kwargs) 1327 detach = True 1328 -> 1329 self._print_svg(filename, fh, kwargs) 1330 1331 # Detach underlying stream from wrapper so that it remains open in
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\backend_bases.py in wrapper(*args, *kwargs) 1637 kwargs.pop(arg) 1638 -> 1639 return func(args, **kwargs) 1640 1641 return wrapper
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\backends\backend_svg.py in _print_svg(self, filename, fh, dpi, bbox_inches_restore, metadata) 1351 bbox_inches_restore=bbox_inches_restore) 1352 -> 1353 self.figure.draw(renderer) 1354 renderer.finalize() 1355
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, *kwargs) 39 renderer.start_filter() 40 ---> 41 return draw(artist, renderer, args, **kwargs) 42 finally: 43 if artist.get_agg_filter() is not None:
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\figure.py in draw(self, renderer) 1862 self.patch.draw(renderer) 1863 mimage._draw_list_compositing_images( -> 1864 renderer, self, artists, self.suppressComposite) 1865 1866 renderer.close_group('figure')
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 129 if not_composite or not has_images: 130 for a in artists: --> 131 a.draw(renderer) 132 else: 133 # Composite any adjacent images together
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, *kwargs) 39 renderer.start_filter() 40 ---> 41 return draw(artist, renderer, args, **kwargs) 42 finally: 43 if artist.get_agg_filter() is not None:
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\cbook\deprecation.py in wrapper(inner_args, inner_kwargs) 409 else deprecation_addendum, 410 kwargs) --> 411 return func(inner_args, **inner_kwargs) 412 413 return wrapper
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\axes_base.py in draw(self, renderer, inframe) 2745 renderer.stop_rasterizing() 2746 -> 2747 mimage._draw_list_compositing_images(renderer, self, artists) 2748 2749 renderer.close_group('axes')
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 154 else: 155 flush_images() --> 156 a.draw(renderer) 157 flush_images() 158
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, *kwargs) 39 renderer.start_filter() 40 ---> 41 return draw(artist, renderer, args, **kwargs) 42 finally: 43 if artist.get_agg_filter() is not None:
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\image.py in draw(self, renderer, *args, **kwargs) 639 if im is not None: 640 trans = Affine2D().scale(im.shape[1], im.shape[0]) + trans --> 641 renderer.draw_image(gc, l, b, im, trans) 642 else: 643 im, l, b, trans = self.make_image(
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\backends\backend_svg.py in draw_image(self, gc, x, y, im, transform) 951 if mpl.rcParams['svg.image_inline']: 952 buf = BytesIO() --> 953 Image.fromarray(im).save(buf, format="png") 954 oid = oid or self._make_id('image', buf.getvalue()) 955 attrib['xlink:href'] = (
D:\Anaconda\lib\site-packages\PIL\Image.py in fromarray(obj, mode) 2783 obj = obj.tostring() 2784 -> 2785 return frombuffer(mode, size, obj, "raw", rawmode, 0, 1) 2786 2787
D:\Anaconda\lib\site-packages\PIL\Image.py in frombuffer(mode, size, data, decoder_name, *args) 2719 if args[0] in _MAPMODES: 2720 im = new(mode, (1, 1)) -> 2721 im = im._new(core.map_buffer(data, size, decoder_name, 0, args)) 2722 im.readonly = 1 2723 return im
TypeError: function takes exactly 6 arguments (5 given)
Other dependencies are also outdated, for instance pillow:
pip install Pillow==8.0.1
Finally, have like 3 days working on this you're the best!!!
AttributeError Traceback (most recent call last) D:\Anaconda\lib\site-packages\IPython\core\formatters.py in call(self, obj) 343 method = get_real_method(obj, self.print_method) 344 if method is not None: --> 345 return method() 346 return None 347 else:
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in _reprhtml(self) 407 def _reprhtml(self): 408 """The ipython notebook widgets user interface gets called by the jupyter notebook.""" --> 409 self.to_notebook_iframe() 410 411 def repr(self):
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in to_notebook_iframe(self) 387 with warnings.catch_warnings(): 388 warnings.simplefilter("ignore") --> 389 display(get_notebook_iframe(self)) 390 391 def to_widgets(self):
D:\Anaconda\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\notebook.py in get_notebook_iframe(profile) 63 output = get_notebook_iframe_src(profile) 64 elif attribute == "srcdoc": ---> 65 output = get_notebook_iframe_srcdoc(profile) 66 else: 67 raise ValueError(
D:\Anaconda\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\notebook.py in get_notebook_iframe_srcdoc(profile) 21 width = config["notebook"]["iframe"]["width"].get(str) 22 height = config["notebook"]["iframe"]["height"].get(str) ---> 23 src = html.escape(profile.to_html()) 24 25 iframe = f''
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in to_html(self) 357 358 """ --> 359 return self.html 360 361 def to_json(self) -> str:
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in html(self) 177 def html(self): 178 if self._html is None: --> 179 self._html = self._render_html() 180 return self._html 181
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in _render_html(self) 284 from pandas_profiling.report.presentation.flavours import HTMLReport 285 --> 286 report = self.report 287 288 disable_progress_bar = not config["progress_bar"].get(bool)
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in report(self) 171 def report(self): 172 if self._report is None: --> 173 self._report = get_report_structure(self.description_set) 174 return self._report 175
D:\Anaconda\lib\site-packages\pandas_profiling\profile_report.py in description_set(self) 152 def description_set(self): 153 if self._description_set is None: --> 154 self._description_set = describe_df(self.title, self.df, self._sample) 155 return self._description_set 156
D:\Anaconda\lib\site-packages\pandas_profiling\model\describe.py in describe(title, df, sample) 70 total=number_of_tasks, desc="Summarize dataset", disable=disable_progress_bar 71 ) as pbar: ---> 72 series_description = get_series_descriptions(df, pbar) 73 74 pbar.set_postfix_str("Get variable types")
D:\Anaconda\lib\site-packages\pandas_profiling\model\summary.py in get_series_descriptions(df, pbar) 517 with multiprocessing.pool.ThreadPool(pool_size) as executor: 518 for i, (column, description) in enumerate( --> 519 executor.imap_unordered(multiprocess_1d, args) 520 ): 521 pbar.set_postfix_str(f"Describe variable:{column}")
D:\Anaconda\lib\multiprocessing\pool.py in next(self, timeout) 746 if success: 747 return value --> 748 raise value 749 750 next = next # XXX
D:\Anaconda\lib\multiprocessing\pool.py in worker(inqueue, outqueue, initializer, initargs, maxtasks, wrap_exception) 119 job, i, func, args, kwds = task 120 try: --> 121 result = (True, func(*args, **kwds)) 122 except Exception as e: 123 if wrap_exception and func is not _helper_reraises_exception:
D:\Anaconda\lib\site-packages\pandas_profiling\model\summary.py in multiprocess_1d(args) 494 """ 495 column, series = args --> 496 return column, describe_1d(series) 497 498 # Multiprocessing of Describe 1D for each column
D:\Anaconda\lib\site-packages\pandas_profiling\model\summary.py in describe_1d(series) 463 if series_description["type"] in type_to_func: 464 series_description.update( --> 465 type_to_func[series_description["type"]](series, series_description) 466 ) 467 else:
D:\Anaconda\lib\site-packages\pandas_profiling\model\summary.py in describe_categorical_1d(series, series_description) 308 check_length = config["vars"]["cat"]["length"].get(bool) 309 if check_length: --> 310 stats.update(length_summary(series)) 311 stats.update( 312 histogram_compute(
D:\Anaconda\lib\site-packages\visions\application\summaries\series\text_summary.py in length_summary(series) 99 100 def length_summary(series: pd.Series) -> dict: --> 101 length = series.str.len() 102 summary = {"length": length} 103 summary.update(named_aggregate_summary(length, "length"))
D:\Anaconda\lib\site-packages\pandas\core\strings\accessor.py in len(self) 2578 dtype: float64 2579 """ -> 2580 result = self._array._str_len() 2581 return self._wrap_result(result, returns_string=False) 2582
AttributeError: 'PandasArray' object has no attribute '_str_len'
Import my data: import numpy as np import pandas as pd from pandas_profiling import ProfileReport from ipywidgets import widgets
df = pd.DataFrame( np.random.rand(100, 5), columns=["a", "b", "c", "d", "e"])
When I run the command: profile = ProfileReport(df, title="Pandas Profiling Report")
have this response:
TypeError Traceback (most recent call last)