cardillo / joinery

Data frames for Java
https://joinery.sh
GNU General Public License v3.0
695 stars 167 forks source link

GroupBy on a DataFrame based on a list and then get the size of a selected column for each Group #78

Open Bishnup1995 opened 5 years ago

Bishnup1995 commented 5 years ago

Example : res['NonNullCount'] = res.groupby(sortOrder)['column'].transform(lambda x: x.count()).astype(int) The above we can do in pandas. How can we do it in Joinery?

cardillo commented 5 years ago

groupBy then count will get you the counts. Then I think you can get the desired result by dropping any extra columns.