Group by or Aggregate? for non numerical attributes

LilC
New Altair Community Member
Hi Guys, me again, the newbie of RapidMiner.
There are 4 cities in the dataset and each city has multiple stores.
And I want to somehow group by the stores with the individual city.
Instead of:
City A, Store1
City A, Store2
City A, Store3
City B, Store4
....
I kinda want to have a form of:
City A, Store 1
Store 2
Store 3
City B, Store 4
....
I hope it makes sense.
Could anyone help me with if there is an operator could achieve this?
Thanks again.
There are 4 cities in the dataset and each city has multiple stores.
And I want to somehow group by the stores with the individual city.
Instead of:
City A, Store1
City A, Store2
City A, Store3
City B, Store4
....
I kinda want to have a form of:
City A, Store 1
Store 2
Store 3
City B, Store 4
....
I hope it makes sense.
Could anyone help me with if there is an operator could achieve this?
Thanks again.
Tagged:
0
Best Answer
-
Hi @LilC,do i see this correctly, that you want to remove the Value in case the proceeding one is the same?In this case i would use Lag, to create a shifted city attibute (City-1). Then you can use Generate Attributes withif(City==[City=1],MISSING_NOMINAL,City)I hope this helps!cheers,Martin5
Answers
-
Hi @LilC,do i see this correctly, that you want to remove the Value in case the proceeding one is the same?In this case i would use Lag, to create a shifted city attibute (City-1). Then you can use Generate Attributes withif(City==[City=1],MISSING_NOMINAL,City)I hope this helps!cheers,Martin5