title: pandas partial join on multiindex
body: <p>So, this is my problem:</p>
  
  <pre><code>dfa = pd.DataFrame({"a": [["a", "b", "c"][int(k/10)] for k in range(30)],
                      "b": ["a" + repr([10, 20, 30, 40, 50, 60][int(k/5)]) for k in range(30)],
                      "c": np.arange(30),
                      "d": np.random.normal(size=30)}).set_index(["a","b","c"])
  dfb = pd.DataFrame({"a": [["a", "b", "c"][int(k/2)] for k in range(6)],
                      "b": ["a" + repr([10, 20, 30, 40, 50, 60][k]) for k in range(6)],
                      "m": np.random.normal(size=6)**2}).set_index(["a","b"])
  </code></pre>
  
  <p>Essentially I have two dataframes with multi-indices and I want to divide <code>dfa.d</code> by <code>dfb.m</code>, joining on <code>("a", "b")</code>. I can't naively do <code>dfa.d / dfb.m</code> or <code>join</code> because it says that <code>merging with more than one level overlap on a multi-index is not implemented</code>.</p>
  
  <p>The most straightforward (lol) way of doing this that I found is:</p>
  
  <pre><code>dfc = dfa.reset_index().set_index(["a", "b"]).join(dfb)
  dfc["r"] = dfc.d / dfc.m
  dfd = dfc.reset_index().set_index(["a", "b", "c"])[["r"]]
  </code></pre>
  
  <p>Any shortcuts?</p>