-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: crosstab fails with categoricals on master #37465
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
Change catch types to reflect error changes closes pandas-dev#37465
The exception message makes me think this is likely due to one of my recent PRs. I'll take a look. |
I suspect the wrong exception might be being raised. This said, ValueError does seem right when looking up a value in a Categorical index that is missing. |
Change catch types to reflect error changes closes pandas-dev#37465
This is working on 1.1.3. will bisect shortly. |
Change catch types to reflect error changes closes pandas-dev#37465
I checked the 1.1.x branch and this has not been backported to it. |
Pretty obvious the error type was changed. |
Change catch types to reflect error changes closes pandas-dev#37465
Change catch types to reflect error changes closes pandas-dev#37465
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.
crosstab no longer works correctly with categorical inputs. This is a regression from 1.1.x.
Code Sample, a copy-pastable example
Produces
Problem description
Previously produced the correct output. A simple regression.
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : d89331b
python : 3.7.9.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19041
machine : AMD64
processor : Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.2.0.dev0+948.gd89331b96
numpy : 1.19.2
pytz : 2020.1
dateutil : 2.8.1
pip : 20.2.4
setuptools : 50.3.0.post20201006
Cython : 0.29.21
pytest : 6.1.1
hypothesis : None
sphinx : 3.2.1
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.4.0
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.18.1
pandas_datareader: v0.10.0dev0+30.gadb67b2
bs4 : 4.8.0
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.2
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.5
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.5.2
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
numba : 0.51.2
The text was updated successfully, but these errors were encountered: