diff --git a/src/nested_pandas/nestedframe/core.py b/src/nested_pandas/nestedframe/core.py index d7aa467..545e955 100644 --- a/src/nested_pandas/nestedframe/core.py +++ b/src/nested_pandas/nestedframe/core.py @@ -315,7 +315,7 @@ def dropna( ) return new_df - def reduce(self, func, *args, **kwargs) -> pd.DataFrame: + def reduce(self, func, *args, **kwargs) -> NestedFrame: """ Takes a function and applies it to each top-level row of the NestedFrame. @@ -368,12 +368,12 @@ def my_sum(col1, col2): col = arg.split(".")[-1] requested_columns.append((layer, col)) - # We require the first *args to be the columns to apply the function to so iterated + # We require the first *args to be the columns to apply the function to if not requested_columns: raise ValueError("No columns in `*args` specified to apply function to") # The remaining args are the extra arguments to the function other than columns - extra_args: tuple[Any, ...] = [] + extra_args: List[Any] = [] if len(requested_columns) < len(args): extra_args = args[len(requested_columns) :]