From f2bdcbf215c58f520ebdf9797970867a3a6d6d4e Mon Sep 17 00:00:00 2001 From: brandon-b-miller Date: Wed, 22 Sep 2021 13:09:46 -0700 Subject: [PATCH] update signature --- python/cudf/cudf/core/dataframe.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/python/cudf/cudf/core/dataframe.py b/python/cudf/cudf/core/dataframe.py index 1143f85a4e6..901bdfe42c8 100644 --- a/python/cudf/cudf/core/dataframe.py +++ b/python/cudf/cudf/core/dataframe.py @@ -4742,7 +4742,9 @@ def query(self, expr, local_dict=None): boolmask = queryutils.query_execute(self, expr, callenv) return self._apply_boolean_mask(boolmask) - def apply(self, func, axis=1): + def apply( + self, func, axis=1, raw=False, result_type=None, args=(), **kwargs + ): """ Apply a function along an axis of the DataFrame. @@ -4756,12 +4758,17 @@ def apply(self, func, axis=1): ---------- func : function Function to apply to each row. - axis : {0 or 'index', 1 or 'columns'}, default 0 Axis along which the function is applied: * 0 or 'index': apply function to each column. Note: axis=0 is not yet supported. * 1 or 'columns': apply function to each row. + raw: bool, default False + Not yet supported + result_type: {'expand', 'reduce', 'broadcast', None}, default None + Not yet supported + args: tuple + Not yet supported Examples -------- @@ -4910,6 +4917,12 @@ def apply(self, func, axis=1): raise ValueError( "DataFrame.apply currently only supports row wise ops" ) + if raw: + raise ValueError("The `raw` kwarg is not yet supported.") + if result_type is not None: + raise ValueError("The `result_type` kwarg is not yet supported.") + if args or kwargs: + raise ValueError("args and kwargs are not yet supported.") return cudf.Series(func(self))