title: Merging dataframes with multiple key columns
body: <p>I'd like to merge this dataframe:</p>
  <pre><code>import pandas as pd
  import numpy as np
  
  df1 = pd.DataFrame([[1,10,100],[2,20,np.nan],[3,30,300]], columns=[&quot;A&quot;,&quot;B&quot;,&quot;C&quot;])
  df1
     A   B    C
  0  1  10  100
  1  2  20  NaN
  2  3  30  300
  </code></pre>
  <p>with this one:</p>
  <pre><code>df2 = pd.DataFrame([[1,422],[10,72],[2,278],[300,198]], columns=[&quot;ID&quot;,&quot;Value&quot;])
  df2
      ID  Value
  0    1    422
  1   10     72
  2    2    278
  3  300    198
  </code></pre>
  <p>to get an output:</p>
  <pre><code>df_output = pd.DataFrame([[1,10,100,422],[1,10,100,72],[2,20,200,278],[3,30,300,198]], columns=[&quot;A&quot;,&quot;B&quot;,&quot;C&quot;,&quot;Value&quot;])
  df_output 
     A   B    C  Value
  0  1  10  100    422
  1  1  10  100     72
  2  2  20  NaN    278
  3  3  30  300    198
  </code></pre>
  <p>The idea is that for df2 the key column is &quot;ID&quot;, while for df1 we have 3 possible key columns [&quot;A&quot;,&quot;B&quot;,&quot;C&quot;].</p>
  <p>Please notice that the numbers in df2 are chosen to be like this for simplicity, and they can include random numbers in practice.</p>
  <p>How do I perform such a merge? Thanks!</p>