Skip to content

Commit 2f977dc

Browse files
authored
DOC: clarify resample example (#55708)
1 parent 9643679 commit 2f977dc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pandas/core/generic.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -9309,17 +9309,15 @@ def resample(
93099309
bucket ``2000-01-01 00:03:00`` contains the value 3, but the summed
93109310
value in the resampled bucket with the label ``2000-01-01 00:03:00``
93119311
does not include 3 (if it did, the summed value would be 6, not 3).
9312-
To include this value close the right side of the bin interval as
9313-
illustrated in the example below this one.
93149312
93159313
>>> series.resample('3min', label='right').sum()
93169314
2000-01-01 00:03:00 3
93179315
2000-01-01 00:06:00 12
93189316
2000-01-01 00:09:00 21
93199317
Freq: 3min, dtype: int64
93209318
9321-
Downsample the series into 3 minute bins as above, but close the right
9322-
side of the bin interval.
9319+
To include this value close the right side of the bin interval,
9320+
as shown below.
93239321
93249322
>>> series.resample('3min', label='right', closed='right').sum()
93259323
2000-01-01 00:00:00 0

0 commit comments

Comments
 (0)