-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: right merge not preserve row order (#27453) #27762
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
Changes from 21 commits
c3565c7
0e481a7
42eaad1
3bba941
803243c
cc269f3
f2249df
5f728a4
7ccebb2
90984e4
de44eae
a8954fe
d328470
3c1a7cb
7fc6441
1e9df2b
d017bd5
71736b8
11ec7d0
c238b50
e29ed1c
2b1b675
ef14ba0
978f91f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -274,6 +274,7 @@ New repr for :class:`~pandas.arrays.IntervalArray` | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
- :class:`pandas.arrays.IntervalArray` adopts a new ``__repr__`` in accordance with other array classes (:issue:`25022`) | ||
- :class:`pandas.core.arrays.IntervalArray` adopts a new ``__repr__`` in accordance with other array classes (:issue:`25022`) | ||
|
||
*pandas 0.25.x* | ||
|
||
|
@@ -292,6 +293,32 @@ New repr for :class:`~pandas.arrays.IntervalArray` | |
|
||
pd.arrays.IntervalArray.from_tuples([(0, 1), (2, 3)]) | ||
|
||
- :meth:`DataFrame.merge` now preserves right frame's row order when executing a right merge (:issue:`27453`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. make this a sub-section (need a line under the title), and put a shorter title, move what you have to the first sentence. |
||
|
||
.. ipython:: python | ||
|
||
left_df = pd.DataFrame({"colors": ["blue", "red"]}, index=pd.Index([0, 1])) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. show these as well, call then just left and rigth |
||
right_df = pd.DataFrame({"hats": ["small", "big"]}, index=pd.Index([1, 0])) | ||
|
||
*pandas 0.25.x* | ||
|
||
.. ipython:: python | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this needs to be a code-block |
||
left_df.merge(right_df, left_index=True, right_index=True, how="right") | ||
colors hats | ||
0 blue big | ||
1 red small | ||
|
||
|
||
*pandas 1.0.0* | ||
|
||
.. ipython:: python | ||
|
||
left_df.merge(right_df, left_index=True, right_index=True, how="right") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let this execute (don't put the results in) |
||
colors hats | ||
1 red small | ||
0 blue big | ||
|
||
|
||
|
||
All :class:`SeriesGroupBy` aggregation methods now respect the ``observed`` keyword | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
@@ -949,6 +976,7 @@ Reshaping | |
- Bug in :func:`melt` where supplying mixed strings and numeric values for ``id_vars`` or ``value_vars`` would incorrectly raise a ``ValueError`` (:issue:`29718`) | ||
- Dtypes are now preserved when transposing a ``DataFrame`` where each column is the same extension dtype (:issue:`30091`) | ||
- Bug in :func:`merge_asof` merging on a tz-aware ``left_index`` and ``right_on`` a tz-aware column (:issue:`29864`) | ||
- :meth:`DataFrame.merge` now preserves right frame's row order when executing a right merge (:issue:`27453`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't put this here, you already have a sub-section |
||
- | ||
|
||
Sparse | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like a rebasing dupe