title: turn a dict that may contain a pandas dataframe to several dicts
body: <p>I have a dict that may be 'infinitely' nested and contain several pandas <code>DataFrame</code>'s (all the <code>DataFrame</code>'s have the same amount of rows).</p>
  
  <p>I want to create a new dict for each row in the <code>DataFrame</code>'s, with the row being transformed to a dict (the key's are the column names) and the rest of the dictionary staying the same.</p>
  
  <p>Note: I am not making a cartesian product between the rows of the different <code>DataFrame</code>'s.</p>
  
  <p>what would be the best and most pythonic way to do it?</p>
  
  <p>Example:</p>
  
  <p>the original <code>dict</code>:</p>
  
  <pre><code>d = {'a': 1,
      'inner': {
          'b': 'string',
          'c': pd.DataFrame({'c_col1': range(1,3), 'c_col2': range(2,4)})
          },
       'd': pd.DataFrame({'d_col1': range(4,6), 'd_col2': range(7,9)})
      }
  </code></pre>
  
  <p>the desired result:</p>
  
  <pre><code>lst_of_dicts = [
     {'a': 1,
      'inner': {
          'b': 'string',
          'c': {
                  'c_col1': 1, 'c_col2':2
               }
          },
       'd': {
               'd_col1': 4, 'd_col2': 7
            }
      },
  
      {'a': 1,
      'inner': {
          'b': 'string',
          'c': {
                  'c_col1': 2, 'c_col2': 3
               }
          },
       'd': {
               'd_col1': 5, 'd_col2': 8
            }
      }
  ]
  </code></pre>