go-gota / gota

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

Dataframe.go #31

Closed vikram-rawat closed 7 years ago

vikram-rawat commented 7 years ago

/this function will help to give arguments to df.subset() and df.select() functions like df.subset(Slice(1,10)) will bring 10 rows from the set /

kniren commented 7 years ago

I very much appreciate your contribution, however this seems to be outside of the scope of this library, as it is only returning a range of integers.

Best, Alex

vikram-rawat commented 7 years ago

Hi,

I totally understand your concern but this actually helps in returning a subsets of rows.

It should help in EDA.

Let me know your views please

On 17-Jun-2017 10:05 pm, "Alex Sánchez" notifications@github.com wrote:

[image: Boxbe] https://www.boxbe.com/overview =?UTF-8?B?QWxleCBTw6FuY2hleg==?= (notifications@github.com) is not on your Guest List https://www.boxbe.com/approved-list?tc_serial=30952393617&tc_rand=1796811761&utm_source=stf&utm_medium=email&utm_campaign=ANNO_MWTP&utm_content=001&key=9Mk%2FJm8f1K76TSl91UhGVUj6g03J0SxvYr%2BbAPBKQVw%3D&token=qkW7rKMqk0XVVSrJh2UbwrRHJGvo%2Fp7OO4TpvqbLK0iPpzGTEKYP%2FJQOTpDhUPoT | Approve sender https://www.boxbe.com/anno?tc_serial=30952393617&tc_rand=1796811761&utm_source=stf&utm_medium=email&utm_campaign=ANNO_MWTP&utm_content=001&key=9Mk%2FJm8f1K76TSl91UhGVUj6g03J0SxvYr%2BbAPBKQVw%3D&token=qkW7rKMqk0XVVSrJh2UbwrRHJGvo%2Fp7OO4TpvqbLK0iPpzGTEKYP%2FJQOTpDhUPoT | Approve domain https://www.boxbe.com/anno?tc_serial=30952393617&tc_rand=1796811761&utm_source=stf&utm_medium=email&utm_campaign=ANNO_MWTP&utm_content=001&dom&key=9Mk%2FJm8f1K76TSl91UhGVUj6g03J0SxvYr%2BbAPBKQVw%3D&token=qkW7rKMqk0XVVSrJh2UbwrRHJGvo%2Fp7OO4TpvqbLK0iPpzGTEKYP%2FJQOTpDhUPoT

I very much appreciate your contribution, however this seems to be outside of the scope of this library, as it is only returning a range of integers.

Best, Alex

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kniren/gota/pull/31#issuecomment-309224362, or mute the thread https://github.com/notifications/unsubscribe-auth/AVTrxJ3gYnwLITai7genZ8NWqzTklYLBks5sE_uEgaJpZM4NqO7Q .

kniren commented 7 years ago

I can understand your point, in fact in a previous version of the code something similar was implemented to obtain ranges and sequences of int. However, I believe that a useful library should do as much as necessary and not more. In this case, anyone can implement a simple range function to return which integers one does need.

Another problem that I see is that the API design is not very representative, that is, calling dataframe.Slice seems a bit misleading on what to expect. Something like dataframe.Range or dataframe.Sequence looks more appropriate.

Maybe in the future we could create a complementary package within this framework that could address some of these helpers functions, but right now it seems a bit overkill and an unnecessary complexity added to the API.

Once again, I appreciate your input and encourage you to keep contributing. Make sure that if you do so, your code is tested, the target merge is at dev branch, the go test, golint, go vet pass, and you adhere to the same formatting and style of the rest of the code.

Best, Alex