Hi, I have some data and want to transform it.
Assume I have this:
User | Action | |
---|---|---|
user1 | user1@email.com | action1 |
user1 | user1@email.com | Action2 |
user2 | user2@email.com | action4 |
user2 | user2@email.com | action10 |
user3 | user3@email.com | action7 |
Then get to the users with more than 1 action with a groupby and row filter:
User | # actions | |
---|---|---|
user1 | user1@email.com | 2 |
user2 | user2@email.com | 2 |
But I really want to concatenate those actions in another column too:
User | # actions | Actions | |
---|---|---|---|
user1 | user1@email.com | 2 | action1; action2 |
user2 | user2@email.com | 2 | action4; action10 |
How can I do this?
Thank you.