From dd67bfdcd2c78cd3a6a34e4cfcb13bd1b7db5283 Mon Sep 17 00:00:00 2001 From: MarcoGorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Thu, 26 Oct 2023 17:53:25 +0100 Subject: [PATCH] DOC: clarify resample example --- pandas/core/generic.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index c49c9eddae62c..8c2ab82e7c327 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -9308,8 +9308,6 @@ def resample( bucket ``2000-01-01 00:03:00`` contains the value 3, but the summed value in the resampled bucket with the label ``2000-01-01 00:03:00`` does not include 3 (if it did, the summed value would be 6, not 3). - To include this value close the right side of the bin interval as - illustrated in the example below this one. >>> series.resample('3min', label='right').sum() 2000-01-01 00:03:00 3 @@ -9317,8 +9315,8 @@ def resample( 2000-01-01 00:09:00 21 Freq: 3min, dtype: int64 - Downsample the series into 3 minute bins as above, but close the right - side of the bin interval. + To include this value close the right side of the bin interval, + as shown below. >>> series.resample('3min', label='right', closed='right').sum() 2000-01-01 00:00:00 0