title: Merge two csv file in python
body: <p>I trying to merge two csv file, I don't want to remove duplicate I want simply to check first column "PDB ID" and then check second column "Chain ID". all values has input files. I want to merge and add column file 1 and file 2. </p>
  
  <pre><code>import pandas as pd
  
  
  a = pd.read_csv("testfile.csv")
  b = pd.read_csv("testfile_1.csv")
  b = b.dropna(axis=1)
  merged = a.merge(b, on='PDB ID')
  merged.to_csv("output.csv", index=False)
  </code></pre>
  
  <p>I used above script but getting result one row three time same value. </p>
  
  <pre><code>File 1: Input
  PDB ID  Chain ID    Ligand ID   Uniprot Acc
  3RSQ    A   NAI   Q9X024
  3RTD    A   NAI   Q9X024
  1E3E    A   NAI   Q9QYY9
  1E3E    B   NAI   Q9QYY9
  1E3I    A   NAI   Q9QYY9
  1E3I    B   NAI   Q9QYY9
  
  File 2: Input
  PDB ID  Chain ID    Avg
  1E3E    A   31.566
  1E3E    B   17.867
  3RSQ    A   57.653   
  1E3I    A   27.63
  1E3I    B   17.867
  3RTD    A   48.806
  
  Getting Output: 
  PDB ID  Chain ID_x  Avg Ligand ID   Uniprot Acc
  3RSQ    A   57.653  NAI   Q9X024
  3RTD    A   48.806  NAI   Q9X024
  1E3E    A   31.566  NAI   Q9QYY9
  1E3E    A   31.566  NAI   Q9QYY9
  1E3E    B   17.867  NAI   Q9QYY9
  1E3E    B   17.867  NAI   Q9QYY9
  1E3I    A   27.63   NAI   Q9QYY9
  1E3I    A   27.63   NAI   Q9QYY9
  1E3I    B   17.867  NAI   Q9QYY9
  1E3I    B   17.867  NAI   Q9QYY9
  
  
  Expected Output:
  
  3RSQ    A   57.653  NAI   Q9X024
  3RTD    A   48.806  NAI   Q9X024
  1E3E    A   31.566  NAI   Q9QYY9
  1E3E    B   17.867  NAI   Q9QYY9
  1E3I    A   27.63   NAI   Q9QYY9
  1E3I    B   17.867  NAI   Q9QYY9
  </code></pre>