Skip to content

Commit

Permalink
sparse
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback committed Dec 13, 2017
1 parent ad12c64 commit 0f5e6ae
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions pandas/core/sparse/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit 0f5e6ae

Please sign in to comment.