Hichem Fazai

Results 17 comments of Hichem Fazai

Hi, With `pivot { "Party" } .groupBy { "Province" and "Gender" }.sum("Age")` I want to get: ![image](https://user-images.githubusercontent.com/57005249/163718860-5a96a6bd-5dce-4226-a4c0-b1d8d8040fb4.png) Using dataframe I get `Province `and `Gender` pivoted independently : ``` Alberta, Female,...

@koperagen Maybe we need to have the function `then` in `ColumnsSelectionDsl` like in `PivotDsl`. This way, my expression become: `pivot { "Party" } .groupBy { "Province" then "Gender" }.sum("Age")`

If I have to group only two columns, `df.pivot { Gender then Party }.groupBy { Province }.sum { Age }` does the thing. But actualy I'm using dataframe to add...

~~`df.pivot { smoker then gender }.groupBy { day and time }`~~ Gives: Update: `df.pivot { day then time }.groupBy { gender and smoker }` Gives: ![image](https://user-images.githubusercontent.com/57005249/164001620-d88d78ed-7895-4617-8010-5cc53e7b1f62.png) ~~My actual workaround is...

> I see the problem, yes. Can you provide the dataset so i can give it a try myself? It would be easier for me to figure it out in...

> Hi, @hfazai. As far as I understand, you need hierarchical grouping of rows, so that `df.groupBy { a then b }` will return `DataFrame` with a single row for...

> Currently this is the only way to perform something similar to nested rows: > I'll try it, thanks! Actually I did a workaround with the sortBy { } and...

Yes, sorry I was wrong I copied the last code in my tests, I mean `df.groupBy { gender and smoker }.pivot { day then time }.sortBy { gender and smoker...

> we can just add some info into `DataColumn` API with span ranges indicating subsequent values that should be rendered in a single merged cell. So internally nothing will change...