How to partially flatten or rotate examples?

caryknoop
caryknoop New Altair Community Member
edited November 2024 in Community Q&A

This is probably easy but I just can't find a way on how to do this in RapidMiner.

 

Here is an example of what I am trying to do, let's say we have the following data:

 

City        Type         Count

----------------------------------------

City 1     People     10000

City 1     Cars              500

City 2     People       8000

City 3     Dogs               20  

I would want to flatten that into:

 

City        People         Cars    Dogs

-----------------------------------------------

City 1      10000         500            ?

City 2          800              ?            ?

City 3               ?              ?           20

 

 

Answers

  • MartinLiebig
    MartinLiebig
    Altair Employee

    Dear Caryknoop,

     

    Pivot is what you search for. Take city as ID and Type as Index attribute.

     

    ~Martin