Skip to content

Commit 5524c3c

Browse files
author
TomAugspurger
committed
change pct_change back to a kwarg
1 parent 7554c87 commit 5524c3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/generic.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3489,7 +3489,8 @@ def pct_change(self, periods=1, fill_method='pad', limit=None, freq=None,
34893489
else:
34903490
data = self.fillna(method=fill_method, limit=limit)
34913491

3492-
rs = data.div(data.shift(periods, freq=freq, axis=axis, **kwds)) - 1
3492+
rs = (data.div(data.shift(periods=periods, freq=freq,
3493+
axis=axis, **kwds)) - 1)
34933494
if freq is None:
34943495
mask = com.isnull(_values_from_object(self))
34953496
np.putmask(rs.values, mask, np.nan)

0 commit comments

Comments
 (0)