Closed RafaelQuirino closed 2 years ago
I think the problem is that if you groupBy a specific column, there's no way you can tell which value the other columns must have unless we change the aggregate API. I have a same problem, imagine a dataframe like |name| height | weight| age|
and you do df.groupBy('name').aggregate(group=>group.stat.sum('age')) what would you do with height and weight? a sum? a mean?
I was quite confused at the time i made this rather stupid question. I apologize...
Aggregation dropping columns I am trying to understand this GroupedDataFrame, its doc is empty. Why when i do a groupBy and then an aggregation all other columns besides the ones given to the groupBy function gets dropped ? I want to perform aggregations and keep all the columns in the dataframe i called groupBy. Is it possible ?