Concatenating Location Codes to a User with Python

  pandas, python

I am trying to concatenate the location codes a user is responsible for to the user’s name with double semi colons as delimiters.

e.x.: Pete::1234::1235::1236::1237….

I think this can be achieved using a for loop, but I just can’t quite get there. All help is appreciated.


First Name Last Name Location
Pete Smith 1234
Pete Smith 1235
Pete Smith 1236
Pete Smith 1237

Source: Python Questions