0

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 .

loki
  • 976
  • 1
  • 10
  • 22
  • 1
    It is a mathematical term. See [Intervals](https://en.wikipedia.org/wiki/Interval_(mathematics)#Terminology) – Sayandip Dutta Jan 23 '20 at 07:31
  • 3
    It'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
  • 1
    I guess... `closed='both'` ([docs here](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Interval.html)) – UJIN Jan 23 '20 at 08:40

0 Answers0