-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: creating DF from series with non exact categorical indices created from pd.cut #42424
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
Closed
2 of 3 tasks
Labels
Bug
Constructors
Series/DataFrame/Index/pd.array Constructors
good first issue
Interval
Interval data type
Needs Tests
Unit test(s) needed to prevent regressions
Regression
Functionality that used to work in a prior pandas version
Milestone
Comments
Hi @hwchase17, I believe this should be resolved in #42425 |
I'd guess that this isn't due to pd.cut itself, but rather Series construction. However, I haven't been able to find a reproducible example constructing |
This works on master now, looks fixed since #42227. Could be backported with some tests? |
simonjayhawkins
added a commit
to simonjayhawkins/pandas
that referenced
this issue
Jul 14, 2021
|
take |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
Constructors
Series/DataFrame/Index/pd.array Constructors
good first issue
Interval
Interval data type
Needs Tests
Unit test(s) needed to prevent regressions
Regression
Functionality that used to work in a prior pandas version
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
as of 1.3.0, this raises the following error. previously, this would run and produce the expected output (see below).
Expected Output
this expected output behavior is better imo because it is more consistent with how this would work for other types of categorical indices. for example:
does NOT error. therefor it does not seem that the desired behavior is to error on non-overlapping categorical indices
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : f00ed8f
python : 3.8.6.final.0
python-bits : 64
OS : Darwin
OS-release : 20.3.0
Version : Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.0
numpy : 1.20.3
pytz : 2021.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 57.0.0
Cython : 3.0a6
pytest : 6.2.4
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.23.1
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : 2021.06.0
fastparquet : None
gcsfs : None
matplotlib : 3.4.2
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : 2021.06.0
scipy : 1.6.3
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: