concate value of same column
Hi,
Will it possible to concate values of (first 2 rows ) same column in dataset.
Can we do this by macros or some other way.if yes please share some example.
Thanks
Answers
-
Hi @dhyadav79
Maybe more details are needed regarding the need to do this or more info about the dataset you're working with. Having said that you could follow a several options:
- Do it in code: Load your dataset into a dataframe, carry out the required operations and save back into a new dataset.
- Window recipe, partition using a dummy variable and configure a window with preceding 1 row and following 0 rows (current), under aggregation use concat. Then join back into your dataset (in some meaningful way)
- Use a combination of Top N recipe (ie select top 2 rows) then Group recipe to concatenate the values. Following this, join back to your main dataset.
I hope this helps!
-
Dheerendra Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Registered Posts: 21 ✭✭✭✭
Thanks for help