I have a data frame already which is something like
x label word
10 1 is
20 2 goal
15 2 left
13 0 am
9 1 are
7 0 I
6 1 hello
2 0 world
I'm trying to create another data frame which, once I have performed the operations to extract from this data frame, looks like this:
label min max words
0 2 13 I, world, am
1 6 10 hello, are, is
2 15 20 goal, left
The words in the words column can be in any order. They represent the words for that specific label.
I have tried using df.groupby but i don't seem to understand how it works. Can someone guide me as to what method should I be looking for?