Skip to content

Commit

Permalink
Version check for pandas compatibility code
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jun 4, 2018
1 parent 9da2c4d commit 004b4ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion holoviews/operation/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from ..core import Operation, Element
from ..core.data import PandasInterface
from ..core.util import pandas_version
from ..element import Scatter


Expand Down Expand Up @@ -49,7 +50,8 @@ def _process_layer(self, element, key=None):
df = df.set_index(xdim).rolling(win_type=self.p.window_type,
**self._roll_kwargs())
if self.p.window_type is None:
rolled = df.apply(self.p.function, raw=True)
kwargs = {'raw': True} if pandas_version >= '0.23.0' else {}
rolled = df.apply(self.p.function, **kwargs)
else:
if self.p.function is np.mean:
rolled = df.mean()
Expand Down

0 comments on commit 004b4ff

Please sign in to comment.