-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: pandas.cut and negative values #14652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
hmm, that does look wrong. welcome for you to have a look! |
@luca-s perfect. if you'd like to do a PR would be great. |
luca-s
added a commit
to luca-s/pandas
that referenced
this issue
Nov 15, 2016
luca-s
added a commit
to luca-s/pandas
that referenced
this issue
Nov 16, 2016
jorisvandenbossche
pushed a commit
to jorisvandenbossche/pandas
that referenced
this issue
Dec 14, 2016
…s-dev#14652 closes pandas-dev#14652 Author: Luca Scarabello <[email protected]> Author: Luca <[email protected]> Closes pandas-dev#14663 from luca-s/issue_14652 and squashes the following commits: 8db26db [Luca Scarabello] Moved new test location to pandas\tools\tests\test_tile.py 90dd07d [Luca Scarabello] Updated whatsnew d6b3da8 [Luca Scarabello] fixed flake8 compliance fdc55b9 [Luca Scarabello] Added test case for pandas-dev#14652 d5790e2 [Luca Scarabello] updated whatsnew v0.19.2 2db0c7a [Luca] BUG: pandas.cut and negative values pandas-dev#14652 (cherry picked from commit 2fc0c68)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is an example of pandas.cut ran on a pandas.Series with only one positive element and then on a pandas.Series with only one negative element. In the second scenario pandas.cut is not able to insert the single value on the only one bin.
I might be wrong but I expected pandas.cut to behave on negative values the same as with positive
values.
A small, complete example of the issue
Expected Output
Output of
pd.show_versions()
pandas: 0.18.1
nose: 1.3.1
pip: 1.5.4
setuptools: 28.0.0
Cython: 0.20.1post0
numpy: 1.11.1
scipy: 0.18.0
statsmodels: 0.6.1
xarray: None
IPython: 5.1.0
sphinx: 1.4.8
patsy: 0.4.1
dateutil: 2.5.3
pytz: 2016.6.1
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999
httplib2: 0.8
apiclient: None
sqlalchemy: 1.0.14
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: 0.2.1
The text was updated successfully, but these errors were encountered: