-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: Pandas 1.1.5 location-based indexing error with quantized pivot table #38367
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
Yikes, @jbrockmendel Is this expected? If yes, any suggestions on how to handle this case? Problem lies in pandas/pandas/core/ops/__init__.py Line 310 in ec8240a
|
Would #38140 fix this? |
Yep, this would fix this |
#38140 is milestoned for 1.3 we will probably want a fix in place for 1.2 since this is a regression. |
We could apply unique to the intersection if it is categorical. This is an ugly fix which could be removed when #38140 is merged |
@phofl if you could put together a PR (suitable for merging before 1.2 release) for review, that'll be great. |
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
An error occurs when attempting to plot a quantized pivot table using Seaborn with the latest version of Pandas (
1.1.5
).The code above is a self-contained example showing what Seaborn is doing when
heatmap()
is called on the input pivot table (data
). See this usage in the Ludwig framework: https://github.com/uber/ludwig/blob/master/ludwig/utils/visualization_utils.py#L1392. Prior to v1.1.5, this code was working fine and used to generate plots in Ludwig.The stack trace is as follows:
Note that this last
mask | pd.isnull(data)
operations succeeds with Pandas 1.1.4 and all other dependencies being left the same.Expected Output
The
mask | pd.isnull(data)
call should succeed.Output of
pd.show_versions()
INSTALLED VERSIONS
commit : b5958ee
python : 3.7.8.final.0
python-bits : 64
OS : Darwin
OS-release : 19.6.0
Version : Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~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.1.5
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.1.0
Cython : 0.29.21
pytest : 6.1.0
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.2
html5lib : None
pymysql : 0.10.1
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.18.1
pandas_datareader: None
bs4 : 4.9.2
bottleneck : None
fsspec : 0.8.4
fastparquet : None
gcsfs : None
matplotlib : 3.3.2
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.5
pandas_gbq : None
pyarrow : 2.0.0
pytables : None
pyxlsb : None
s3fs : None
scipy : 1.5.2
sqlalchemy : 1.3.20
tables : 3.6.1
tabulate : 0.8.7
xarray : 0.16.1
xlrd : 1.2.0
xlwt : 1.3.0
numba : 0.52.0
The text was updated successfully, but these errors were encountered: