Do you know the History of Data Science? READ MORE

Data Prep Question

Solved!
kinho
Level 1
Level 1
Data Prep Question

I have a data table, and I know the final format it needs to be in. I'm struggling with how to get there ... Was hoping someone can help me, ideally with a visual recipe.

Here is the format of the table now:

Ranking     2000            2004            2008

1                    USA           Japan           Ireland

2                   Ireland       USA              USA

3                   Japan        Ireland         France

 

Here is the format I want it to be in:

Country             Average Rank

USA                     1.66

France                3

Ireland               2

Japan                 2

0 Kudos
1 Solution
emate
Neuron
Neuron

Hi @kinho 

You can do it with: Prepare recipe + Group by.

First go to Prep recipe and "Fold multiple columns" (2000, 2004, 2008) then use "group by" with column being column with country prefix and set field aggregation for Rank to "Avg"

dss_1.pngdss_2.png

dss_3.png

 

Thanks

Mateusz

View solution in original post

3 Replies
emate
Neuron
Neuron

Hi @kinho 

You can do it with: Prepare recipe + Group by.

First go to Prep recipe and "Fold multiple columns" (2000, 2004, 2008) then use "group by" with column being column with country prefix and set field aggregation for Rank to "Avg"

dss_1.pngdss_2.png

dss_3.png

 

Thanks

Mateusz

View solution in original post

CoreyS
Community Manager
Community Manager

Thanks for the solution @emate

Looking for more resources to help you use DSS effectively and upskill your knowledge? Check out these great resources: Dataiku Academy | Documentation | Knowledge Base

A reply answered your question? Mark as ‘Accepted Solution’ to help others like you!
0 Kudos
kinho
Level 1
Level 1
Author

Amazing! Thank you!

0 Kudos
A banner prompting to get Dataiku DSS