Closed Jefftopia closed 6 years ago
@Jefftopia Hi, have you resolved your computation issue ?
If you need to iterate on each groups of a groupedDataFrame you can use .toCollection (similar to [...yourGroupedDataFrame]
).
It's also possible to groupBy inside an aggregate: df.groupBy(...).aggregate(gdf => gdf.groupBy(...).aggregate(...))
or to group on multiple keys (think tidy data instead of nested one).
Refers to: https://gmousse.gitbooks.io/dataframe-js/doc/api/groupedDataframe.html
Thanks, I resolved the issue.
Refers to: https://gmousse.gitbooks.io/dataframe-js/doc/api/groupedDataframe.html
@Gmousse, it seems the documentation content for GroupedDataFrame
at the docs link is not being populated (I see an empty section when I load it). Is it possible that the page location has changed or something like that?
By the way, thank you for the info in this thread about working with GroupedDataFrames
!
How can I achieve the following structure? (Nested group-by).
I have now something like the following:
One issue I have is that
for (const dfGroup of dataFrame)
is not normally supported by TypeScript when compiling to es5. By default, TypeScript only supports Array types for afor let
orfor const
.Enabling down-compilation of iterators causes other issues with the Angular framework, so it isn't a good solution for me,
Edit:
Is it as simple as: