opened
eyadsibai
username_0
```  File "/python3.6/site-packages/pandas_profiling/base.py", line 59, in describe_numeric_1d
    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
TypeError: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead.
issue
created
tejaslodaya
username_1
Boolean values shouldn't enter `describe_numeric_1d` function. It must be treated as Categorical.

Can you provide a snapshot of the data you're running it on?
Or the datatype may also help.
comment
created
eyadsibai
username_0
I had a boolean column using latest numpy version... and pandas 0.20.2
comment
created
tejaslodaya
username_1
In `base.py` file, go to line number 59.
Change 
`stats['range'] = stats['max'] - stats['min']`
to 
`stats['range'] = np.subtract(stats['max'], stats['min'], dtype=np.float32)`
and report the results.
comment
created
tejaslodaya
username_1
@username_0 Does it work?
I couldn't reproduce the results. So, bear with me for some manual editing.
comment
created
eyadsibai
username_0
Yes I believe this solves the problem!
comment
closed
eyadsibai
username_0
issue
created
chinmaythosar
username_2
yep. had a similar issue where series.py at line ~1800 had to manually edit
'good = -bad' to 'good = ~bad'

surprisingly even when I commented the first line to add the second it game me an error saying  - is not supported ...
comment
created
Rubyguanzi
username_3
I also got this error ，and then check the numpy version numpy1.8.1 can ，but 1.5.1 not
comment
created
jvschoen
username_4
Still encountering this error when going through a GCP tutorial:
https://cloud.google.com/solutions/building-a-propensity-model-for-financial-services-on-gcp
Trying to run the 2nd cell in section 2) Data Exploration.
comment
reopened
sbrugman
username_5
```  File "/python3.6/site-packages/pandas_profiling/base.py", line 59, in describe_numeric_1d
    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
TypeError: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead.
issue
created
sbrugman
username_5
@username_4 thank you for reporting this issue. Are you in the position to export the data frame (for example .csv) and post it here easily? 

Without using BigQuery, the code seems to work just fine:
```
# As features on the Google Cloud Platform website:
# https://cloud.google.com/solutions/building-a-propensity-model-for-financial-services-on-gcp


import pandas as pd

from pandas_profiling import ProfileReport


if __name__ == "__main__":
    df = pd.read_csv('https://storage.googleapis.com/erwinh-public-data/bankingdata/bank-full.csv', sep=';')

    profile = ProfileReport(df, title="GCP Banking Data")
    profile.to_file('gcp_banking_report.html', silent=False)
```
comment
created
jvschoen
username_4
@username_5 I worked through a force update earlier that worked, but this seems a bit cleaner approach. I'll edit it in my notebook and run accordingly in the future. Thanks for the quick response and solution!
comment
created
jvschoen
username_4
To add to this thread. This solution will break the notebook instance and you can no longer access the jupyterlab. you'll need to ssh in to troubleshoot. However, I did figure out you need to `pip uninstall attr` then `pip install attrs` before shutting down your instance to ensure jupyter starts up properly. I know this is a bit of a tangent from the question, and more of an issue with GCP, but just wanted to make sure if someone tried this solution they may run into issues getting back into their AI notebook.
comment
closed
sbrugman
username_5
issue
created
joshtemple
username_6
What is the status of this issue? I'm getting the same error when trying to run the report in a JupyterLab notebook. It looks like solutions have been proposed (modifying the local version of the user's code), but no PRs are referenced or merged.
comment
reopened
sbrugman
username_5
```  File "/python3.6/site-packages/pandas_profiling/base.py", line 59, in describe_numeric_1d
    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
TypeError: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead.
issue
created
sbrugman
username_5
@username_6 
Could you provide the minimal information to reproduce this error? [This guide](http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) can help crafting a minimal bug report.

- the minimal code you are using to generate the report

- which environment you are using: 
    - operating system (e.g. Windows, Linux, Mac)
    - Python version (e.g. 3.7)
    - jupyter notebook, console or IDE such as PyCharm
    - Package manager (e.g. pip, conda)
    - packages (`pip freeze > packages.txt`)

- a sample or description of the dataset (`df.head()`, `df.info()`)
comment