I thought I had found my solution here Join a dataframe with a column from another, based on a common column
The example given in the original question is exactly what I want to do. I ran into two problems: 1) the attribute select was not recognized. I changed it to select dtypes.
joinedDF = df.join(df1.select_dtypes('New_UWI', 'Li_mg_L'), ['New_UWI'])
- With the above code I get: TypeError: data type 'New_UWI' not understood
Both my dataframes have several columns in them, some of them are common to both. 'New_UWI' is the key to merge these two files on as it represents the Unique Well Identifiers in each dataframe. The 'Li_mg_L' is the value for the concentration of Lithium for each UWI. Li_mg_L only exists in df1. Manually one would have to look at each UWI between the two dataframes and find an exact match. Then copy the 'Li_mg_L' value from that UWI in df1 to that same UWI in df creating a new column in df called 'Li_mg_L'. I thought the code above according to that link should do exactly what I wanted. What am I doing wrong? Thanks
Update: Used the hints on Join given within Visual Studio and found either of these two code lines work perfect. I prefer "on= " because it prefers the original index column name.
joinedDF = df.set_index('New_UWI').join(other=df1.set_index('New_UWI'))
joinedDF = df.join(other=df1.set_index('New_UWI'), on='New_UWI')