What does it do when we specify closed='left'
? I have read pandas documentation and it says closed is for the closed interval but i don't get it .
Asked
Active
Viewed 37 times
0

loki
- 976
- 1
- 10
- 22

Suyen Shrestha
- 31
- 4
-
1It is a mathematical term. See [Intervals](https://en.wikipedia.org/wiki/Interval_(mathematics)#Terminology) – Sayandip Dutta Jan 23 '20 at 07:31
-
3It's inclusive vs exclusive. if the interval is `closed='left'`, then the left boundary is **included** and the right is **excluded** eg `[0, 10)` is `0 <= x < 10` – Chris Adams Jan 23 '20 at 07:35
-
2`closed = 'left'` means, `[x,y)` in math intervals. – Joe Jan 23 '20 at 07:36
-
If what you guys said is true then how can we do both ends closed as in [x,y] in terms of grouper? – Suyen Shrestha Jan 23 '20 at 07:45
-
1I guess... `closed='both'` ([docs here](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Interval.html)) – UJIN Jan 23 '20 at 08:40