ydata-profiling: TypeError: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead.
stats['range'] = stats['max'] - stats['min']
TypeError: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead.
I got this error
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (3 by maintainers)
In
base.pyfile, go to line number 59. Changestats['range'] = stats['max'] - stats['min']tostats['range'] = np.subtract(stats['max'], stats['min'], dtype=np.float32)and report the results.Stale issue
@jvschoen thank you for reporting this issue. This is a specific GCP issue. In a local environment, the code seems to work just fine:
Solution for GCP Jupyterlab: There is a solution for the GCP notebook.
pandas-profilinginstalled. You can achieve this by replacing the pip install in the first cell with:Make sure you restart the kernel.
You can verify the version using:
with
Enabeling widgets
The widget inferface might need some extra steps to work:
!pip install --user -U pandas-profiling[notebook]sudo jupyter labextension install @jupyter-widgets/jupyterlab-managerYou can then run this code:
Yes I believe this solves the problem!
@eyadsibai Does it work? I couldn’t reproduce the results. So, bear with me for some manual editing.