gunju91
September 24, 2021, 5:05pm
1
How to group the data and get the corresponding data of other column in a ‘Set’ format?!
I have attached the screenshot of my question with the question.
Date
Order_id
Product
2/8/2021
91
Burger1
2/8/2021
91
Burger4
2/8/2021
91
Burger2
2/8/2021
91
Burger9
2/8/2021
91
Burger1
2/8/2021
91
Burger3
2/8/2021
91
Burger5
2/8/2021
94
Burger2
2/8/2021
94
Burger3
2/8/2021
94
Burger4
4/8/2021
97
Burger7
4/8/2021
97
Burger2
4/8/2021
97
Burger5
4/8/2021
97
Burger3
4/8/2021
97
Burger2
4/8/2021
97
Burger3
Desired output
Date
Order_id
Product
2/8/2021
91
[Burger1, Burger4, Burger2, Burger9, Burger1, Burger3, Burger3]
2/8/2021
94
[Burger2, Burger3, Burger4]
4/8/2021
97
[Burger7, Burger2, Burger5, Burger3, Burger2, Burger3]
ques|604x494
HansS
September 24, 2021, 5:30pm
2
Hi @gunju91 welcome to KNIME
Did you try a GroupBy (on date and order_id) and List as the aggregation function?
gr. Hans
4 Likes
gunju91
September 24, 2021, 5:42pm
3
Hi @HansS
Thanks for the answer. I tried GroupBy on ‘Order id’ only. Let me try on both date and order id.
1 Like
gunju91
September 24, 2021, 6:00pm
4
Hi @HansS
I tried it’s not working
1 Like
HansS
September 24, 2021, 6:36pm
5
Hi @gunju91
Strange, this works on my machine data_to_list.knwf (6.9 KB)
5 Likes
Hi @gunju91 The groupby suggested by @HansS should work. Can you show what you did?
4 Likes
gunju91
September 25, 2021, 6:23am
7
I referred your file & tried it. It’s working absolutely file.
Thanks a ton for the help to a beginner like me.
I have alsoKNIME_GunjarFuley_project3.knwf (8.3 KB)
attached the file on which I am working.
3 Likes
gunju91
September 25, 2021, 6:25am
8
Hi @bruno29a
You are 100% correct. It’s working.
Thanks for the support.
HansS
September 25, 2021, 7:08am
9
Hi @gunju91
Glad to here its working. And a tip:
Be aware when uploading a workflow you uncheck the option Reset Workflow(s) before export. Your csv reader is pointing to a file on your machine, but it is not loaded.
Happy KNIMEing.
gr. Hans
4 Likes
gunju91
September 25, 2021, 7:27am
10
Definitely, I shall consider it from next time when I import.
Thanks a lot!
4 Likes
system
Closed
October 2, 2021, 7:28am
11
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.