Skip to content

Commit 9b982c5

Browse files
committed
update comments for _adjust_binner_for_upsample
1 parent b4696c3 commit 9b982c5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pandas/core/resample.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,10 @@ def _downsample(self, how, **kwargs):
962962
return self._wrap_result(result)
963963

964964
def _adjust_binner_for_upsample(self, binner):
965-
""" adjust our binner when upsampling """
965+
"""
966+
Adjust our binner when upsampling.
967+
The range of a new index should not be outside specified range
968+
"""
966969
if self.closed == 'right':
967970
binner = binner[1:]
968971
else:
@@ -1156,6 +1159,7 @@ def _get_binner_for_time(self):
11561159

11571160
def _adjust_binner_for_upsample(self, binner):
11581161
""" adjust our binner when upsampling """
1162+
# Just returning binner directly, GH 13022
11591163
return binner
11601164

11611165

pandas/tests/test_resample.py

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from pandas.compat import range, lrange, zip, OrderedDict
2727
from pandas.errors import UnsupportedFunctionCall
2828
import pandas.tseries.offsets as offsets
29-
from pandas.tseries.frequencies import to_offset
3029
from pandas.tseries.offsets import Minute, BDay
3130

3231
from pandas.core.groupby.groupby import DataError

0 commit comments

Comments
 (0)