diff --git a/pandas/core/sparse/frame.py b/pandas/core/sparse/frame.py index 36a18d8f8b4a0..05f39a8caa6f6 100644 --- a/pandas/core/sparse/frame.py +++ b/pandas/core/sparse/frame.py @@ -861,11 +861,17 @@ def apply(self, func, axis=0, broadcast=False, reduce=False): new_series, index=self.index, columns=self.columns, default_fill_value=self._default_fill_value, default_kind=self._default_kind).__finalize__(self) - else: - if not broadcast: - return self._apply_standard(func, axis, reduce=reduce) - else: - return self._apply_broadcast(func, axis) + + from pandas.core.apply import frame_apply + op = frame_apply(self, + func=func, + axis=axis, + reduce=reduce) + + if broadcast: + return op.apply_broadcast() + + return op.apply_standard() def applymap(self, func): """