python tip

Joining Columns

Often, you might need to join several columns with a specific separator. Here's an easy way to do this:

# Joining columns with first and last name
clients['name'] = clients['first_name'] + ' ' + clients['last_name']


As you can see, we combined the first_name and last_name columns into the name column, where the first and last names are separated by a space.