Data Manipulation
I have the following data:
I would like to group the data by User ID as follows:
ID
CategotyA (contains the number of subcategories)
CategoryB (contains the number of subcategories)
CategoryC( contains the number of subcategories)
example output
Could someone help by providing the process and parameter needed?
User ID | Category | Subcategory | |
02 | A | Sub1 | |
02 | B | Sub2 | |
03 | C | Syb7 |
I would like to group the data by User ID as follows:
ID
CategotyA (contains the number of subcategories)
CategoryB (contains the number of subcategories)
CategoryC( contains the number of subcategories)
example output
User ID | CategoryA | CategoryB | |
02 | 20 | 11 | |
03 | 5 | 55 | |
04 | 9 | 21 |
Could someone help by providing the process and parameter needed?
0
Best Answer
-
IngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751
RM Founder
Hi,you can also Turbo Prep to do this sort of transformation very easily. After loading your data in Turbo Prep, simply switch to "Pivot" and drop the columns from the left into the right places. "User ID" into "group-by" on the left, "Category" into the column headers at the top, and "Subcategory" into the aggregates at the bottom. That's it :-)Hope this helps,Ingo5
Answers
Lindon Ventures
Data Science Consulting from Certified RapidMiner Experts