Skip to content

Commit 68aeb8d

Browse files
authored
add Column.is_in (#160)
1 parent 1f68bdd commit 68aeb8d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

spec/API_specification/dataframe_api/column_object.py

+18
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,24 @@ def isnan(self) -> Column:
431431
In particular, does not check for `np.timedelta64('NaT')`.
432432
"""
433433

434+
def is_in(self, values: Column) -> Column[bool]:
435+
"""
436+
Indicate whether the value at each row matches any value in `values`.
437+
438+
Parameters
439+
----------
440+
values : Column
441+
Contains values to compare against. May include ``float('nan')`` and
442+
``null``, in which case ``'nan'`` and ``null`` will
443+
respectively return ``True`` even though ``float('nan') == float('nan')``
444+
isn't ``True``.
445+
The dtype of ``values`` must match the current column's dtype.
446+
447+
Returns
448+
-------
449+
Column[bool]
450+
"""
451+
434452
def unique_indices(self, *, skip_nulls: bool = True) -> Column[int]:
435453
"""
436454
Return indices corresponding to unique values in Column.

0 commit comments

Comments
 (0)