Skip to content

Commit 5c35dec

Browse files
committed
Update comparison_with_r.rst
1 parent 7fc2a21 commit 5c35dec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/source/comparison_with_r.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ this:
9999
.. ipython:: python
100100
101101
s = pd.Series(np.arange(5),dtype=np.float32)
102-
s.apply(lambda x: [2, 4].index(x) if x in [2,4] else np.nan)
102+
Series(pd.match(s,[2,4],np.nan))
103103
104104
For more details and examples see :ref:`the reshaping documentation
105105
<indexing.basics.indexing_isin>`.

0 commit comments

Comments
 (0)