How do I apply a value from a dataframe based on the value of a multi-index of another dataframe? <p>I have the following:</p> <p>Dataframe 1 (Multi-index dataframe):</p> <pre><code> | Assay_A | --------------------------------------------------- Index_A | Index_B | Index_C | mean | std | count | --------------------------------------------------- 128 12345 AAA 123 2 4 </code></pre> <p>Dataframe 2:</p> <pre><code> Index | Col_A | Col_B | Col_C | mean ------------------------------------- 1 128 12345 AAA 456 </code></pre> <p>where Col_X = Index_X for a,b,c.</p> <p>I have been spending all morning trying to do the following:</p> <p>How do I pick the correct mean in dataframe 2 (which has to match up on Col ABC) so I can do mathematical operations on it. For example, I want to take the mean of dataframe 1 and divide it by the correctly chosen mean of dataframe 2.</p> <p>Ideally, I want to store the results of the operation in a new column. So the final output should look like this:</p> <pre><code> | Assay_A | ------------------------------------------------------------ Index_A | Index_B | Index_C | mean | std | count | result | ------------------------------------------------------------ 128 12345 AAA 123 2 4 0.26 </code></pre> <p>Perhaps there is an easier way to do this I would be open to any such suggestions as well.</p>