Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
BUG: pd.cut with bins=1 and input all 0s #15428
Comments
TomAugspurger
added Algos Bug
labels
Feb 16, 2017
TomAugspurger
added this to the
0.20.0
milestone
Feb 16, 2017
|
Sure a fix would be great. |
jreback
added Difficulty Novice Effort Low
labels
Feb 17, 2017
jreback
referenced
this issue
Feb 17, 2017
Closed
BUG: pd.qcut with q=1 and input with identical values #15431
jreback
closed this
in d32acaa
Mar 8, 2017
AnkurDedania
added a commit
to AnkurDedania/pandas
that referenced
this issue
Mar 21, 2017
|
|
luca-s + AnkurDedania |
65bdde5
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
luca-s commentedFeb 16, 2017
•
edited
Code Sample, a copy-pastable example if possible
Problem description
The special case of an input containing all 0s raises a ValueError. I had a look at the code and it is straightforward to fix. I can provide a PR if requested.
Expected Output
Output of
pd.show_versions()INSTALLED VERSIONS
commit: None
python: 2.7.12.final.0
python-bits: 64
OS: Linux
OS-release: 4.8.0-36-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.19.2
nose: 1.3.7
pip: 8.1.1
setuptools: 32.3.1
Cython: 0.23.4
numpy: 1.12.0
scipy: 0.18.1
statsmodels: 0.6.1
xarray: None
IPython: 5.1.0
sphinx: 1.5.1
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2016.10
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999
httplib2: 0.9.1
apiclient: None
sqlalchemy: 1.1.4
pymysql: None
psycopg2: None
jinja2: 2.8.1
boto: None
pandas_datareader: 0.2.1