From 2246ab1a9f964a0996df16e6659cf42fd396da58 Mon Sep 17 00:00:00 2001 From: Shobhit Singh Date: Fri, 2 Feb 2024 02:34:47 +0000 Subject: [PATCH 1/2] docs: Fix the `DataFrame.apply` code sample --- .../bigframes_vendored/pandas/core/frame.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/third_party/bigframes_vendored/pandas/core/frame.py b/third_party/bigframes_vendored/pandas/core/frame.py index 93fba9f3aa..da5a0a1fb2 100644 --- a/third_party/bigframes_vendored/pandas/core/frame.py +++ b/third_party/bigframes_vendored/pandas/core/frame.py @@ -3296,19 +3296,19 @@ def apply(self, func, *, args=(), **kwargs): >>> df = bpd.DataFrame({'col1': [1, 2], 'col2': [3, 4]}) >>> df - col1 col2 - 0 1 3 - 1 2 4 + col1 col2 + 0 1 3 + 1 2 4 [2 rows x 2 columns] >>> def sqaure(x): ... return x * x - >>> df1 = df.apply(sqaure) - >>> df + + >>> df.apply(sqaure) col1 col2 - 0 1 3 - 1 2 4 + 0 1 9 + 1 4 16 [2 rows x 2 columns] From ea64c5340d870b3341623cd3a1578a9cc881acc4 Mon Sep 17 00:00:00 2001 From: Shobhit Singh Date: Fri, 2 Feb 2024 02:40:49 +0000 Subject: [PATCH 2/2] fix typo --- third_party/bigframes_vendored/pandas/core/frame.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/bigframes_vendored/pandas/core/frame.py b/third_party/bigframes_vendored/pandas/core/frame.py index da5a0a1fb2..05f4167838 100644 --- a/third_party/bigframes_vendored/pandas/core/frame.py +++ b/third_party/bigframes_vendored/pandas/core/frame.py @@ -3302,10 +3302,10 @@ def apply(self, func, *, args=(), **kwargs): [2 rows x 2 columns] - >>> def sqaure(x): + >>> def square(x): ... return x * x - >>> df.apply(sqaure) + >>> df.apply(square) col1 col2 0 1 9 1 4 16