Skip to content

Commit 3060169

Browse files
committed
Finish up
1 parent 0285efb commit 3060169

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ Other enhancements
167167
- :func:`DataFrame.to_excel` now raises an ``UserWarning`` when the character count in a cell exceeds Excel's limitation of 32767 characters (:issue:`56954`)
168168
- :func:`pandas.merge` now validates the ``how`` parameter input (merge type) (:issue:`59435`)
169169
- :func:`pandas.merge`, :meth:`DataFrame.merge` and :meth:`DataFrame.join` now support anti joins (``left_anti`` and ``right_anti``) in the ``how`` parameter (:issue:`42916`)
170+
- :func:`pandas.merge`, :meth:`DataFrame.merge` and :meth:`DataFrame.join` now support left-semi joins in the ``how`` parameter (:issue:`62961`)
170171
- :func:`read_spss` now supports kwargs to be passed to pyreadstat (:issue:`56356`)
171172
- :func:`read_stata` now returns ``datetime64`` resolutions better matching those natively stored in the stata format (:issue:`55642`)
172173
- :meth:`DataFrame.agg` called with ``axis=1`` and a ``func`` which relabels the result index now raises a ``NotImplementedError`` (:issue:`58807`).

pandas/tests/reshape/merge/test_semi.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ def test_left_semi(vals_left, vals_right, dtype):
3636
result = left.merge(right, how="left_semi")
3737
tm.assert_frame_equal(result, expected)
3838

39+
result = left.join(right.set_index("a"), how="left_semi", on="a")
40+
tm.assert_frame_equal(result, expected)
41+
42+
result = left.set_index("a").join(right.set_index("a"), how="left_semi")
43+
tm.assert_frame_equal(result, expected.set_index("a"))
44+
3945
result = left.set_index("a").merge(
4046
right.set_index("a"), how="left_semi", left_index=True, right_index=True
4147
)

0 commit comments

Comments
 (0)