title: Merging two tables in Python
body: <p>I have created two tables and am trying to merge them but for some reason it's not working.</p>
  
  <p>My two tables are:</p>
  
  <pre><code>table_account_id = data1.groupby('employer_key').account_id.nunique() #how many people logged in (unique account id)
  
  table_eligible = data3.groupby(['employer_key'])[['eligible']].sum().astype('int') #eligible population
  </code></pre>
  
  <p>I want my new table to have the following columns:    </p>
  
  <pre><code>Employer_key // account_id // eligible
  </code></pre>
  
  <p>I thought the code would be the following but it isn't working: </p>
  
  <pre><code>new_table = pd.merge(table_eligible, table_account_id, left_index=True, right_index=True)
  </code></pre>
  
  <p>I was able to merge these two tables until I inserted the nunique function into my table_account_id code.</p>
  
  <p>Thanks!</p>