BUG: Index of RHS of series assignment ignored #40184
Labels
Closing Candidate
May be closeable, needs more eyeballs
Indexing
Related to indexing on series/frames, not to indexes themselves
[ x ] I have checked that this issue has not already been reported.
[ x ] I have confirmed this bug exists on the latest version of pandas.
Code Sample, a copy-pastable example
Problem description
When assigning a series to another, the index of the RHS should be considered. In this example, the mapping of the RHS is {2: 4, 1: 5, 0: 6}, but such mapping is ignored in the final result.
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 3e89b4c
python : 3.7.8.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-76-generic
Version : #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : None
LOCALE : en_US.UTF-8
pandas : 1.2.0
numpy : 1.19.1
pytz : 2020.1
dateutil : 2.8.1
pip : 20.2.3
setuptools : 49.6.0.post20200814
Cython : 0.29.21
pytest : 6.0.2
hypothesis : 5.28.0
sphinx : 3.2.1
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.3.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : 0.8.2
fastparquet : None
gcsfs : None
matplotlib : 3.3.1
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 1.0.1
pyxlsb : None
s3fs : None
scipy : 1.5.2
sqlalchemy : None
tables : None
tabulate : None
xarray : 0.16.2
xlrd : None
xlwt : None
numba : 0.52.0
The text was updated successfully, but these errors were encountered: