BUG: Inconsistent name of binary operations between Series and ndarray, list, tuple #33930
Closed
3 tasks done
Labels
Milestone
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
[this should explain why the current behaviour is a problem and why the expected output is a better solution]
Depending on how binary operation is done, e.g. arithmetic operation or function call resulting
name
is different.Series
object with noname
is constructed from ndarray, list or tuple https://github.com/pandas-dev/pandas/blob/master/pandas/core/ops/__init__.py#L476. Call forget_op_result_name
with arguments of originalSeries
object and constructedSeries
object with no name leads to name being set toNone
.Series
object is created in_arith_method_SERIES
and call toget_op_result_name
to arguments ofSeries
and non-ABCSeries, non-ABCIndexClass leads toname
ofSeries
operand being preserved.Expected Output
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here leaving a blank line after the details tag]INSTALLED VERSIONS
commit : None
python : 3.7.7.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 12, GenuineIntel
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : None.None
pandas : 1.0.3
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 20.1
setuptools : 41.2.0
Cython : 0.29.17
pytest : 5.3.5
hypothesis : None
sphinx : None
blosc : None
feather : 0.4.0
xlsxwriter : None
lxml.etree : 4.5.0
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.13.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.5.0
matplotlib : 3.2.0
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : 0.13.1
pyarrow : 0.16.0
pytables : None
pytest : 5.3.5
pyxlsb : None
s3fs : 0.4.0
scipy : 1.4.1
sqlalchemy : 1.3.15
tables : None
tabulate : None
xarray : 0.15.0
xlrd : 1.2.0
xlwt : None
xlsxwriter : None
numba : None
INSTALLED VERSIONS
commit : 81093ba
python : 3.7.5.final.0
python-bits : 64
OS : Linux
OS-release : 5.3.0-26-generic
Version : #28-Ubuntu SMP Wed Dec 18 05:37:46 UTC 2019
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.1.0.dev0+1453.g81093ba82
numpy : 1.17.3
pytz : 2019.2
dateutil : 2.7.3
pip : 18.1
setuptools : 41.1.0
Cython : 0.29.17
pytest : 5.3.5
hypothesis : None
sphinx : None
blosc : None
feather : 0.4.0
xlsxwriter : None
lxml.etree : 4.5.0
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.12.0
pandas_datareader: None
bs4 : 4.8.2
bottleneck : None
fastparquet : None
gcsfs : None
matplotlib : 3.1.3
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : 0.13.0
pytables : None
pyxlsb : None
s3fs : 0.4.2
scipy : 1.4.1
sqlalchemy : 1.3.11
tables : 3.6.1
tabulate : None
xarray : 0.15.1
xlrd : 1.2.0
xlwt : None
numba : 0.46.0
The text was updated successfully, but these errors were encountered: