Q:

Merge two data frames and retain unique columns

I have these two data frames:
1st df
#df1 -----

    location            Ethnic Origins       Percent(1)
0   Beaches-East York   English              18.9 
1   Davenport           Portuguese           22.7
2   Eglinton-Lawrence   Polish               12.0

2nd df
 #df2 -----

    location                                            lat        lng
0   Beaches—East York, Old Toronto, Toronto, Golde...   43.681470   -79.306021
1   Davenport, Old Toronto, Toronto, Golden Horses...   43.671561   -79.448293
2   Eglinton—Lawrence, North York, Toronto, Golden...   43.719265   -79.429765

Expected Output:
I want to use the location column of #df1 as it is cleaner and retain all other columns.  I don't need the city, country info on the location column.  
    location            Ethnic Origins   Percent(1)  lat       lng
0   Beaches-East York   English          18.9        43.681470  -79.306021
1   Davenport           Portuguese       22.7        43.671561  -79.448293
2   Eglinton-Lawrence   Polish           12.0        43.719265  -79.429765

I have tried several ways to merge them but to no avail.  
This returns a NaN for all lat and long rows
df3 = pd.merge(df1, df2, on="location", how="left")

This returns a NaN for all Ethnic and Percent rows
df3 = pd.merge(df1, df2, on="location", how="right")

A:

As others have noted, the problem is that the 'location' columns do not share any values.  One solution to this is to use a regular expression to get rid of everything starting with the first comma and extending to the end of the string:
df2.location = df2.location.replace(r',.*', '',  regex=True)

Using the exact data you provide this still won't work because you have different kinds of dashes in the two data frame.  You could solve this in a similar way (no regex needed this time):
df2.location = df2.location.replace('—', '-')

And then merge as you suggested
df3 = pd.merge(df1, df2, on="location", how="left")

