Skip to content

Commit

Permalink
Note null behavior in where docs (NVIDIA#11276)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-b-miller authored Jul 15, 2022
1 parent 11ed8bc commit 9627091
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions python/cudf/cudf/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,22 @@ def where(self, cond, other=None, inplace=False):
3 <NA>
4 <NA>
dtype: int64
.. pandas-compat::
Note that ``where`` treats missing values as falsy,
in parallel with pandas treatment of nullable data:
>>> gsr = cudf.Series([1, 2, 3])
>>> gsr.where([True, False, cudf.NA])
0 1
1 <NA>
2 <NA>
dtype: int64
>>> gsr.where([True, False, False])
0 1
1 <NA>
2 <NA>
dtype: int64
"""
raise NotImplementedError

Expand Down

0 comments on commit 9627091

Please sign in to comment.