title: Merging two datasets by column name 'Name'
body: <p>I am trying to merge two datasets for a project and am curious as to how I merge the two under the similar column 'Name'. I tried and so far the output doesn't print out any data along with it.</p>
  
  <pre><code>import pandas as pd
  
  #importing the two datasets
  Data1 = pd.read_csv('Desktop/MLB.csv')
  Data2 = pd.read_csv('Downloads/Untitled spreadsheet - Sheet1.csv')
  
  #making a name column to merge the two with
  Data1['Name'] = (Data1['Last Name'] + ' ' + ',' + ' ' + '-' + Data1['First Name'].astype(str).str[0] + '-')
  Data2['Name'] = Data2['Player']
  
  #isolating the desired columns
  Data3 = Data2.loc[:,['Pos', '-G-', '-AB-', '-R-', '-H-', '2B', '3B', '-HR-','RBI', 'BB', '-SO-', '-SB-', '-CS-', 'AVG▼', 'OBP', '-SLG-', 'OPS', 'Name']]
  Data4 = Data1.loc[:,['Position', 'FPPG', 'Name']]
  
  #merging the two datasets
  Data5 = pd.merge(Data3, Data4, on='Name')
  Data5
  
  #the output
  Pos -G- -AB-    -R- -H- 2B  3B  -HR-    RBI BB  -SO-    -SB-    -CS- AVG▼ OBP   -SLG-   OPS Name    Position    FPPG
  </code></pre>
  
  <p>Any help would be appreciated.</p>
  
  <p>Best,
  Brendan.</p>