title: Nested dictionary from pandas data frame
body: <p>I have the following data (see below) in a pandas data frame.</p>
  
  <p>I'd like to covert it into a dict that looks like this:</p>
  
  <pre><code>my_dict = {
  
  'AB': { 
          'city1': (0.000000, 0.000000),
           'city2' : (0.100000, 0.200000),
            'city3' : (0.200000, 0.400000)
  
         }
  'BC': { 
          'city4':  (0.300000, 0.600000),
           'city5' : (0.400000, 0.800000),
        }
       }
  </code></pre>
  
  <p>I am aware of pandas' <code>to_dict()</code> method but have been unable to coerce it to perform this.</p>
  
  <hr>
  
  <pre><code>   iso                city        lat        lng
  0   AB               city1  0.000000    0.000000
  1   AB               city2  0.100000    0.200000
  2   AB               city3  0.200000    0.400000
  3   BC               city4  0.300000    0.600000
  4   BC               city5  0.400000    0.800000
  </code></pre>