Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -10339,6 +10339,14 @@ def map(
0 NaN 4
1 5.0 5

It is also possible to use `map` with functions that are not
`lambda` functions:

>>> df.map(round, ndigits=1)
0 1
0 1.0 2.1
1 3.4 4.6

Note that a vectorized version of `func` often exists, which will
be much faster. You could square each number elementwise.

Expand Down