title: Merge multiple DataFrames Pandas
body: <p>This might be considered as a duplicate of <a href="https://stackoverflow.com/questions/53645882/pandas-merging-101">a thorough explanation of various approaches</a>, however I can't seem to find a solution to my problem there due to a higher number of Data Frames.</p>
  
  <p>I have <strong>multiple</strong> Data Frames (more than 10), each differing in one column <code>VARX</code>. This is just a quick and oversimplified example:</p>
  
  <pre><code>import pandas as pd
  
  df1 = pd.DataFrame({'depth': [0.500000, 0.600000, 1.300000],
         'VAR1': [38.196202, 38.198002, 38.200001],
         'profile': ['profile_1', 'profile_1','profile_1']})
  
  df2 = pd.DataFrame({'depth': [0.600000, 1.100000, 1.200000],
         'VAR2': [0.20440, 0.20442, 0.20446],
         'profile': ['profile_1', 'profile_1','profile_1']})
  
  df3 = pd.DataFrame({'depth': [1.200000, 1.300000, 1.400000],
         'VAR3': [15.1880, 15.1820, 15.1820],
         'profile': ['profile_1', 'profile_1','profile_1']})
  </code></pre>
  
  <p>Each <code>df</code> has same or different depths for the same profiles, so</p>
  
  <p>I need to create a new DataFrame which would merge all separate ones, where the <strong>key columns</strong> for the operation are <code>depth</code> and <code>profile</code>, with <strong>all</strong> appearing depth values for each profile.</p>
  
  <p>The <code>VARX</code> value should be therefore <code>NaN</code> where there is no depth measurement of that variable for that profile.</p>
  
  <p>The result should be a thus a new, compressed DataFrame with all <code>VARX</code> as additional columns to the <code>depth</code> and <code>profile</code> ones, something like this:</p>
  
  <pre><code>name_profile    depth   VAR1        VAR2        VAR3
  profile_1   0.500000    38.196202   NaN         NaN
  profile_1   0.600000    38.198002   0.20440     NaN
  profile_1   1.100000    NaN         0.20442     NaN
  profile_1   1.200000    NaN         0.20446     15.1880
  profile_1   1.300000    38.200001   NaN         15.1820
  profile_1   1.400000    NaN         NaN         15.1820
  </code></pre>
  
  <p>Note that the actual number of profiles is much, much bigger.</p>
  
  <p>Any ideas?</p>