how to concat several rows and create one value in a new column separated by comma
![prabhakaran808](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar11.png)
prabhakaran808
Dataiku DSS Core Designer, Registered Posts: 6 ✭✭✭
Hi,
I would like to Concat a set of rows in to one value in a column separated by comma or colon. Example as below.
My Dataset,
Contract ID | Contract name |
M11 | AA |
M11 | BB |
M11 | CC |
M21 | DD |
M21 | EE |
M21 | FF |
M31 | GG |
M31 | HH |
I would like to achieve the output like below.
Contract ID | Contract name |
M11 | AA;BB;CC |
M21 | DD;EE;FF |
M31 | GG;HH |
Can this be achieved in Dataiku?
Operating system used: windows
Best Answers
-
Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,211 Dataiker
Hi @prabhakaran808
,You can use the Group recipe. https://knowledge.dataiku.com/latest/courses/basics/group-data/group-data-summary.html
For the column you want to contact select "concat" and the separator e.g ; or ,Thanks
-
Thanks Alex. It works