my df
looks like this:
category text_list
-------- ---------
soccer [soccer, game, is, good, soccer, game]
basketball [game, basketball, game]
volleyball [sport ,volleyball, sport]
What I want to do is groupby
category
and then list the words
by its frequency
category text_list frequency
-------- --------- ---------
soccer soccer 2
game 2
is 1
good 1
basketball game 2
basketball 1
volleyball sport 2
volleyball 1
what did I do?
- I am able to find the
frequency
per row but I am not able to label the way I wanted in aDataFrame
Could someone please help me? If possible using NLTK