From d62e1b9b5b4826afdc178c892fb7b31691236874 Mon Sep 17 00:00:00 2001 From: Prabakaran Kumaresshan Date: Sat, 5 Jan 2019 09:15:59 +0530 Subject: [PATCH] DOC: update applymap docstring in pandas/core/frame.py (#24612) --- pandas/core/frame.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index a50def7357826..9c9720522189d 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -6501,6 +6501,14 @@ def applymap(self, func): -------- DataFrame.apply : Apply a function along input axis of DataFrame. + Notes + ----- + In the current implementation applymap calls `func` twice on the + first column/row to decide whether it can take a fast or slow + code path. This can lead to unexpected behavior if `func` has + side-effects, as they will take effect twice for the first + column/row. + Examples -------- >>> df = pd.DataFrame([[1, 2.12], [3.356, 4.567]])