I'm parsing some data from a CSV into a proper SQL database.
Let's say I have
PersonId PersonName TripId
21 Joe 634
34 Hannah 853
34 Hannah 952
54 Ronnie 153
As a dataframe in pandas. But I'm turning this data into a Person and Trip table in SQL. So, I'm making the relation that a Person (primary key Name and Id) is able to travel 0 or more times. So, I need to drop based on PersonId and PersonName, and keep the TripId as it is going to be my external key. Once It's done, my result would be:
PersonId PersonName TripId
21 Joe 634
34 Hannah 853, 952
54 Ronnie 153
So, Hannah would not be repeated. How do I do this?