Say I have a pandas DataFrame of a certain shape that looks like:
ID Text Class
1 A series of escapades the adage ... 1
1 A series of escapades the adage ... 2
1 A series 2
1 A series 2
1 A series 2
1 A series 2
2 A 2
2 series 2
2 A 2
2 A 2
I would like to create a new Dataframe that has the form:
ID Text Class
1 A series of escapades the adage ... 1
2 A 2
That gets the first of every 'ID' and gets ride of the rest. How can I do this? I am still new to pandas and numpy so I'm still trying to understand how to manipulate data to my liking.
Thank you for the help!