Skip to content

Commit 0f5e6ae

Browse files
committed
sparse
1 parent ad12c64 commit 0f5e6ae

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

pandas/core/sparse/frame.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -861,11 +861,17 @@ def apply(self, func, axis=0, broadcast=False, reduce=False):
861861
new_series, index=self.index, columns=self.columns,
862862
default_fill_value=self._default_fill_value,
863863
default_kind=self._default_kind).__finalize__(self)
864-
else:
865-
if not broadcast:
866-
return self._apply_standard(func, axis, reduce=reduce)
867-
else:
868-
return self._apply_broadcast(func, axis)
864+
865+
from pandas.core.apply import frame_apply
866+
op = frame_apply(self,
867+
func=func,
868+
axis=axis,
869+
reduce=reduce)
870+
871+
if broadcast:
872+
return op.apply_broadcast()
873+
874+
return op.apply_standard()
869875

870876
def applymap(self, func):
871877
"""

0 commit comments

Comments
 (0)