Index order of joined frame does not respect the order of left frame when right contains duplicates #16304
Labels
Bug
Closing Candidate
May be closeable, needs more eyeballs
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Code Sample
Problem description
The index order after joining a frame with duplicate index values seems arbitrary or (lexicographically) sorted rather than preserving the order of the left frame.
Expected Output
When joining two frames the left frame should dictate the order of the resulting data frame. This was seemingly fixed by #15582, however, with the above examples this is not the case.
Output of
pd.show_versions()
pandas: 0.20.1
pytest: 3.0.7
pip: 9.0.1
setuptools: 35.0.2
Cython: None
numpy: 1.12.1
scipy: 0.19.0
xarray: None
IPython: 6.0.0
sphinx: 1.5.5
patsy: None
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: 2.6.2
feather: None
matplotlib: 2.0.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: