title: Match in Python
body: <p>I have two excel files. Two files also have about 200 000 lines. (I give just six lines in examples.)</p>
  
  <p>file1.xlsx </p>
  
  <pre><code>  M1          M2          M3        M4
  97.1859   -59.1873     0.000912    4.55
  63.116    -75.958      0.003797    20.85
  112.09    -22.9276     0.005008    2.26
  320.7931  -63.4153     0.008382    7.45
  337.8978  -72.8617     0.009965    3.88
  99.2183   -56.5418     0.018141    18.17
  </code></pre>
  
  <p>file2.xlsx</p>
  
  <pre><code> N1        N2      N3     N4       N5          N6
  0.057      4       Im    6.61    0.005008    38.85929
  0.065      36      Im    9.27    0.003797   -19.4988
  0.062      68      Im    8.06    0.008382   -51.8935
  0.066      46      Im    8.55    0.009965   -40.5912
                     Im    9.1     0.000912     1.089013
  0.075      32      Im    12.31   0.018141     3.946489
  </code></pre>
  
  <p>M3(in file1) and N5(in file2) columns the same. </p>
  
  <p>According to M3-N5 columns, I want to match these two files and create third file(output file) in Python.</p>
  
  <p>output.xlsx</p>
  
  <pre><code>   M1        M2          M3-N5       M4    N1     N2   N3    N4          N5
  97.1859   -59.1873     0.000912    4.55                Im    9.1       1.089013
  63.116    -75.958      0.003797    20.85  0.065   36   Im    9.27    -19.4988
  112.09    -22.9276     0.005008    2.26   0.057    4   Im    6.61     38.85929
  320.7931  -63.4153     0.008382    7.45   0.062   68   Im    8.06    -51.8935
  337.8978  -72.8617     0.009965    3.88   0.066   46   Im    8.55    -40.5912
  99.2183   -56.5418     0.018141    18.17  0.075   32   Im    12.31     3.946489
  </code></pre>
  
  <p>I did in a program called TOPCAT but I want to do in Python for comparison. However I've started to use new Python so I can not write detailed codes.</p>
  
  <p>How can I do this? Which code can I get it through?</p>
  
  <p>Any help or suggestions would be greatly appreciated.</p>
  
  <p>Thanks.</p>