From fb96fc8b1d3f662aba59a9ee1cf388efb3e150cf Mon Sep 17 00:00:00 2001 From: brandon-b-miller <53796099+brandon-b-miller@users.noreply.github.com> Date: Thu, 23 Mar 2023 18:52:32 -0500 Subject: [PATCH] Fix `GroupBy.apply` doc examples rendering (#12994) Closes https://github.com/rapidsai/cudf/issues/12986. Authors: - https://github.com/brandon-b-miller Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) URL: https://github.com/rapidsai/cudf/pull/12994 --- python/cudf/cudf/core/groupby/groupby.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/cudf/cudf/core/groupby/groupby.py b/python/cudf/cudf/core/groupby/groupby.py index 1ab1da92bc7..122e8091050 100644 --- a/python/cudf/cudf/core/groupby/groupby.py +++ b/python/cudf/cudf/core/groupby/groupby.py @@ -1278,13 +1278,14 @@ def mult(df): ``engine='jit'`` may be used to accelerate certain functions, initially those that contain reductions and arithmetic operations between results of those reductions: + >>> import cudf >>> df = cudf.DataFrame({'a':[1,1,2,2,3,3], 'b':[1,2,3,4,5,6]}) >>> df.groupby('a').apply( - ... lambda group: group['b'].max() - group['b'].min(), - ... engine='jit' + ... lambda group: group['b'].max() - group['b'].min(), + ... engine='jit' ... ) - a None + a None 0 1 1 1 2 1 2 3 1