Skip to content

Commit f593a22

Browse files
committed
fix ts resample with base
1 parent 572cf8e commit f593a22

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pandas/tseries/resample.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def _get_time_delta_bins(self, ax):
228228
if not len(ax):
229229
binner = labels = TimedeltaIndex(data=[], freq=self.freq, name=ax.name)
230230
return binner, [], labels
231-
231+
232232
labels = binner = TimedeltaIndex(start=ax[0],
233233
end=ax[-1],
234234
freq=self.freq,
@@ -238,11 +238,7 @@ def _get_time_delta_bins(self, ax):
238238

239239
# Addresses GH #10530
240240
if self.base > 0:
241-
last = labels[-1]
242-
labels_shifted = labels.copy()
243-
labels_shifted = labels_shifted.shift(self.base)
244-
labels_shifted = labels_shifted[labels_shifted <= last]
245-
labels = labels_shifted
241+
labels = labels.shift(self.base)
246242

247243
bins = ax.searchsorted(end_stamps, side='left')
248244

0 commit comments

Comments
 (0)