Skip to content

Commit

Permalink
add before and after examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Cernek committed Oct 26, 2019
1 parent 7e6fd64 commit 077b948
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion doc/source/whatsnew/v1.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ Backwards incompatible API changes

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

*pandas 0.25.x*

Expand All @@ -144,6 +143,32 @@ Backwards incompatible API changes
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`)

.. ipython:: python
left_df = pd.DataFrame({"colors": ["blue", "red"]}, index = pd.Index([0, 1]))
right_df = pd.DataFrame({"hats": ["small", "big"]}, index = pd.Index([1, 0]))
*pandas 0.25.x*

.. ipython:: python
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")
colors hats
1 red small
0 blue big
.. _whatsnew_1000.api.other:

Expand Down

0 comments on commit 077b948

Please sign in to comment.