Skip to content

Commit

Permalink
bug in Resampling to frequency='B' closed='right' nd label='right'
Browse files Browse the repository at this point in the history
  • Loading branch information
natmokval committed Aug 26, 2024
1 parent 224c6ff commit 1834bbb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pandas/core/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -2173,7 +2173,11 @@ def _get_time_bins(self, ax: DatetimeIndex):
if self.closed == "right":
labels = binner
if self.label == "right":
labels = labels[1:]
if binner.freqstr == "B":
labels = labels[1:-1]
bins = bins[0:-1]
else:
labels = labels[1:]
elif self.label == "right":
labels = labels[1:]

Expand Down

0 comments on commit 1834bbb

Please sign in to comment.