0

I have a dataset of the form

ID  SomeVal
1   "text"
2   "text2"
2   "two"
3   "three"
4   "4"
4    "four"

I am trying to create a groupby that allows each unique ID to be a row in the table such as follows...

ID. SomeVal
1  ["text"]
2  ["text2","two"]
3  ["three"]
4  ["4","four"]

From the documents I saw, I am unsure if this is possible while taking advantage of Pandas as groupby seems to require numerical aggregations. Is there a way to take advantage of the speed of pandas to obtain this result?

Min
  • 329
  • 1
  • 3
  • 19

0 Answers0