Skip to content

Commit

Permalink
bruh
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthKitten2130 committed Dec 14, 2023
1 parent 649f3a8 commit 3ad3653
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -10365,11 +10365,28 @@ def map(
0 1
0 3 4
1 5 5
<<<<<<< HEAD
>>> df.map(round, digits=2)
0 1
0 1.00 2.12
1 3.36 4.57
=======
>>> def foo(x):
if x > 2.5:
x = 2
elif x <= 2.5:
x = 1
return x
>>> df.map(foo)
0 1
0 1 1
1 2 2
>>>>>>> parent of 6f40da17ba (Updated Documentation for the map method)
Like Series.map, NA values can be ignored:
Expand Down

0 comments on commit 3ad3653

Please sign in to comment.