-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Incorrect behavior of binary operations when left/right operands have different type (Series/DataFrame) #37663
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
Hi, thanks for your report. When executing this on master, I get the expected output. Seems to be fixed |
@phofl: On master I get:
|
Hm, seems that I was on a feature branch locally, which did not raise the error. I will try to find out which one... |
Hm weird, can not replicate this... |
@phofl: By "this" do you mean you can't replicate the ValueError or can't replicate the feature branch fix? |
Unfortunately I can not replicate the fix :( |
Uh oh!
There was an error while loading. Please reload this page.
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
Why we can not to do binary operations when we work with
DataFrame
andSeries
(dataframe has 1 columns,len(df.index)==len(series.index)) with duplicated indexes? If left and right operands have the same type (
DataFrame/DataFrame` for example) it works.Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 67a3d42
python : 3.8.3.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-50-generic
Version : #54-Ubuntu SMP Mon May 6 18:46:08 UTC 2019
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US
LOCALE : en_US.ISO8859-1
pandas : 1.1.4
numpy : 1.19.2
pytz : 2020.1
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.4.0.post20200518
Cython : None
pytest : 6.1.1
hypothesis : None
sphinx : None
blosc : None
feather : 0.4.1
xlsxwriter : None
lxml.etree : 4.5.2
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : None
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : 0.8.3
fastparquet : None
gcsfs : None
matplotlib : 3.2.2
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.5
pandas_gbq : 0.14.0
pyarrow : 1.0.0
pytables : None
pyxlsb : None
s3fs : 0.5.1
scipy : 1.5.2
sqlalchemy : 1.3.19
tables : 3.6.1
tabulate : None
xarray : 0.16.1
xlrd : 1.2.0
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: