diff --git a/optimus/engines/base/columns.py b/optimus/engines/base/columns.py index 07d874325..4dd86675c 100644 --- a/optimus/engines/base/columns.py +++ b/optimus/engines/base/columns.py @@ -1316,7 +1316,6 @@ def agg_exprs(self, cols="*", funcs=None, *args, compute=True, tidy=True, parall agg_result = {func.__name__: {col_name: self.exec_agg(func(df.data[col_name], *args), compute=False) for col_name in cols} for func in funcs} - @self.F.delayed def compute_agg(values): return convert_numpy(format_dict(values, tidy)) @@ -1455,7 +1454,7 @@ def percentile(self, cols="*", values=None, relative_error=RELATIVE_ERROR, estim if values is None: values = [0.25, 0.5, 0.75] - return df.cols.agg_exprs(cols, self.F.percentile, values, relative_error, estimate, tidy=tidy, compute=True) + return df.cols.agg_exprs(cols, self.F.percentile, values, relative_error, estimate, tidy=tidy, compute=compute) def median(self, cols="*", relative_error=RELATIVE_ERROR, tidy=True, compute=True): """ diff --git a/optimus/engines/base/functions.py b/optimus/engines/base/functions.py index 6059ce650..e5290982c 100644 --- a/optimus/engines/base/functions.py +++ b/optimus/engines/base/functions.py @@ -496,7 +496,7 @@ def percentile(self, series, values=0.5, error=False, estimate=False): if not len(_series): return np.nan else: - return self.delayed(self._format_to_dict(_series.quantile(values))) + return self.delayed(self._format_to_dict)(_series.quantile(values)) # def radians(series): # return series.to_float().radians()