javascriptdata / danfojs

Danfo.js is an open source, JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.
https://danfo.jsdata.org/
MIT License
4.81k stars 209 forks source link

DataFrame groupby typings does not follow groupby implementation #315

Closed Devwulf closed 2 years ago

Devwulf commented 3 years ago

Hello! I've noticed that the groupby() typings for dataframes do not follow the intended implementation of the groupby() function.

The documentation here: https://github.com/opensource9ja/danfojs/blob/146ba82ca723527f5c2008b5077c6a13d196e01f/danfojs-browser/src/core/frame.js#L2310 states that the col parameter is a list of (string) columns, while the typing here: https://github.com/opensource9ja/danfojs/blob/146ba82ca723527f5c2008b5077c6a13d196e01f/danfojs-browser/types/core/frame.d.ts#L554 declares that the function only takes in a string value. This will probably lead to errors when used, since string values are not mappable.

Also, perhaps this parameter can be made optional by allowing it to be undefined?

risenW commented 3 years ago

Thanks for raising this. @steveoni Can you update this

risenW commented 2 years ago

Fixed!