From 61c0dd3a4a6bbc7a0edf4a3ed462b67f0d9f2b7d Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 31 Dec 2018 15:05:57 -0600 Subject: [PATCH] Fixed PeriodArray._time_shift positional argument --- pandas/core/arrays/period.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/arrays/period.py b/pandas/core/arrays/period.py index 9827c111e0fd2..5a74f04c237d0 100644 --- a/pandas/core/arrays/period.py +++ b/pandas/core/arrays/period.py @@ -418,7 +418,7 @@ def fillna(self, value=None, method=None, limit=None): # -------------------------------------------------------------------- - def _time_shift(self, n, freq=None): + def _time_shift(self, periods, freq=None): """ Shift each value by `periods`. @@ -437,7 +437,7 @@ def _time_shift(self, n, freq=None): raise TypeError("`freq` argument is not supported for " "{cls}._time_shift" .format(cls=type(self).__name__)) - values = self.asi8 + n * self.freq.n + values = self.asi8 + periods * self.freq.n if self._hasnans: values[self._isnan] = iNaT return type(self)(values, freq=self.freq)