go-gota / gota

Gota: DataFrames and data wrangling in Go (Golang)
Other
2.97k stars 276 forks source link

Slice bug #182

Open yongplus opened 2 years ago

yongplus commented 2 years ago

I found an issue.

When i called Slice method with two paramenters (j,k) on a Series object, If the value of k just is equal to the Series` length , Then it return empty. I jumped to the file 'github.com\go-gota\gota@v0.12.0\series\series.go' in the gota package source, Try to modified the line if j > k || j < 0 || k >= s.Len() { to if j > k || j < 0 || k > s.Len() { in the Slice method, Everything is ok.

Method below: func (s Series) Slice(j, k int) Series