title: How to update a dataframe with dictionary values?
body: <p>I have a dictionary that has a mapping of every unique key to every unique value. I also have a dataframe that has a column that contains all of these keys (possibly numerous times). A column adjacent to the column of keys has values that need to be replaced by value associated with the key in the other column. </p>
  
  <p>I have tried using iloc, where, and update, but I can't seem to get it to work. </p>
  
  <pre><code>df = pd.DataFrame({'1': ['A', 'B', 'C', 'D'],
                   '2': ["alpha", 2.34, 0, 4.1234],
                    '3': ["bravo", 20.123, 3.123123, 0],
                     '4': ["charlie", 20.123, 3.123123, 0],
                     '5': ["delta", 20.123, 3.123123, 0]},
  
                   index=['1', '2', '3', '4'])
  </code></pre>
  
  <p>and the dictionary </p>
  
  <pre><code>d = {'A': 2, 'B': 3, 'C': 5, 'D': 10}
  </code></pre>
  
  <pre><code>df = pd.DataFrame({'1': ['A', 'B', 'C', 'D'],
                   '2': ["2", "3", "5", "10"],
                    '3': [7, 20.123, 3.123123, 0],
                     '4': [9, 20.123, 3.123123, 0],
                     '5': [11, 20.123, 3.123123, 0]},
  
                   index=['1', '2', '3', '4'])
  </code></pre>
  
  <p>This is the expected output from the merge.</p>