-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
qcut: Option to return -inf/inf as lower/upper bound #17282
Labels
Comments
I would like to working on this issue. |
Go for it! No need to ask for permission, unless someone else already claimed it (e.g via PR). |
dberenbaum
added a commit
to dberenbaum/pandas
that referenced
this issue
Jul 28, 2018
dberenbaum
added a commit
to dberenbaum/pandas
that referenced
this issue
Jul 28, 2018
dberenbaum
added a commit
to dberenbaum/pandas
that referenced
this issue
Jul 28, 2018
This was referenced Jul 28, 2018
dberenbaum
added a commit
to dberenbaum/pandas
that referenced
this issue
Jul 30, 2018
dberenbaum
added a commit
to dberenbaum/pandas
that referenced
this issue
Aug 3, 2018
dberenbaum
added a commit
to dberenbaum/pandas
that referenced
this issue
Aug 3, 2018
This was referenced Aug 3, 2018
mroeschke
added
cut
cut, qcut
and removed
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
quantile
quantile method
labels
Apr 5, 2020
Thanks for the request, but it appears this feature request hasn't gain much traction in years so closing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code Sample
Problem description
I'm currently using
qcut
andcut
together for Machine Learning. I useqcut
to cut training data into quantiles and usecut
to cut the test data into the same bins.However, if a value in the test data is too high/low, it will violate the Categories created by qcut, and the resulting category will be NaN. A solution to this is to create an option to return -inf/inf as lower/upper bound of the categories.
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.1.final.0
python-bits: 64
OS: Linux
OS-release: 3.10.0-514.26.2.el7.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.20.1
pytest: 3.0.7
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.12.1
scipy: 0.19.0
xarray: None
IPython: 5.3.0
sphinx: 1.5.6
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: 1.2.1
tables: 3.3.0
numexpr: 2.6.2
feather: None
matplotlib: 2.0.2
openpyxl: 2.4.7
xlrd: 1.0.0
xlwt: 1.2.0
xlsxwriter: 0.9.6
lxml: 3.7.3
bs4: 4.6.0
html5lib: 0.9999999
sqlalchemy: 1.1.9
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: