@@ -706,7 +706,7 @@ def iterkv(self, *args, **kwargs):
706
706
"iteritems alias used to get around 2to3. Deprecated"
707
707
warnings .warn ("iterkv is deprecated and will be removed in a future "
708
708
"release, use ``iteritems`` instead." ,
709
- FutureWarning )
709
+ FutureWarning , stacklevel = 2 )
710
710
return self .iteritems (* args , ** kwargs )
711
711
712
712
def __len__ (self ):
@@ -3376,11 +3376,11 @@ def resample(self, rule, how=None, axis=0, fill_method=None,
3376
3376
For frequencies that evenly subdivide 1 day, the "origin" of the
3377
3377
aggregated intervals. For example, for '5min' frequency, base could
3378
3378
range from 0 through 4. Defaults to 0
3379
-
3379
+
3380
3380
3381
3381
Examples
3382
3382
--------
3383
-
3383
+
3384
3384
Start by creating a series with 9 one minute timestamps.
3385
3385
3386
3386
>>> index = pd.date_range('1/1/2000', periods=9, freq='T')
@@ -3409,11 +3409,11 @@ def resample(self, rule, how=None, axis=0, fill_method=None,
3409
3409
Downsample the series into 3 minute bins as above, but label each
3410
3410
bin using the right edge instead of the left. Please note that the
3411
3411
value in the bucket used as the label is not included in the bucket,
3412
- which it labels. For example, in the original series the
3412
+ which it labels. For example, in the original series the
3413
3413
bucket ``2000-01-01 00:03:00`` contains the value 3, but the summed
3414
- value in the resampled bucket with the label``2000-01-01 00:03:00``
3414
+ value in the resampled bucket with the label``2000-01-01 00:03:00``
3415
3415
does not include 3 (if it did, the summed value would be 6, not 3).
3416
- To include this value close the right side of the bin interval as
3416
+ To include this value close the right side of the bin interval as
3417
3417
illustrated in the example below this one.
3418
3418
3419
3419
>>> series.resample('3T', how='sum', label='right')
@@ -3424,7 +3424,7 @@ def resample(self, rule, how=None, axis=0, fill_method=None,
3424
3424
3425
3425
Downsample the series into 3 minute bins as above, but close the right
3426
3426
side of the bin interval.
3427
-
3427
+
3428
3428
>>> series.resample('3T', how='sum', label='right', closed='right')
3429
3429
2000-01-01 00:00:00 0
3430
3430
2000-01-01 00:03:00 6
@@ -3453,7 +3453,7 @@ def resample(self, rule, how=None, axis=0, fill_method=None,
3453
3453
2000-01-01 00:02:00 2
3454
3454
Freq: 30S, dtype: int64
3455
3455
3456
- Upsample the series into 30 second bins and fill the
3456
+ Upsample the series into 30 second bins and fill the
3457
3457
``NaN`` values using the ``bfill`` method.
3458
3458
3459
3459
>>> series.resample('30S', fill_method='bfill')[0:5]
@@ -3468,7 +3468,7 @@ def resample(self, rule, how=None, axis=0, fill_method=None,
3468
3468
3469
3469
>>> def custom_resampler(array_like):
3470
3470
... return np.sum(array_like)+5
3471
-
3471
+
3472
3472
>>> series.resample('3T', how=custom_resampler)
3473
3473
2000-01-01 00:00:00 8
3474
3474
2000-01-01 00:03:00 17
0 commit comments