Skip to content

Commit f0d656f

Browse files
author
Nico Cernek
committed
add before and after examples
1 parent 3f541c2 commit f0d656f

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

doc/source/whatsnew/v1.0.0.rst

+26-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ Backwards incompatible API changes
125125

126126
- :class:`pandas.core.groupby.GroupBy.transform` now raises on invalid operation names (:issue:`27489`).
127127
- :class:`pandas.core.arrays.IntervalArray` adopts a new ``__repr__`` in accordance with other array classes (:issue:`25022`)
128-
- :meth:`DataFrame.merge` now preserves right frame's row order when executing a right merge (:issue:`27453`)
129128

130129
*pandas 0.25.x*
131130

@@ -144,6 +143,32 @@ Backwards incompatible API changes
144143
145144
pd.arrays.IntervalArray.from_tuples([(0, 1), (2, 3)])
146145
146+
- :meth:`DataFrame.merge` now preserves right frame's row order when executing a right merge (:issue:`27453`)
147+
148+
.. ipython:: python
149+
150+
left_df = pd.DataFrame({"colors": ["blue", "red"]}, index = pd.Index([0, 1]))
151+
right_df = pd.DataFrame({"hats": ["small", "big"]}, index = pd.Index([1, 0]))
152+
153+
*pandas 0.25.x*
154+
155+
.. ipython:: python
156+
left_df.merge(right_df, left_index=True, right_index=True, how="right")
157+
colors hats
158+
0 blue big
159+
1 red small
160+
161+
162+
*pandas 1.0.0*
163+
164+
.. ipython:: python
165+
166+
left_df.merge(right_df, left_index=True, right_index=True, how="right")
167+
colors hats
168+
1 red small
169+
0 blue big
170+
171+
147172
148173
.. _whatsnew_1000.api.other:
149174

0 commit comments

Comments
 (0)