title: Convert list of dictionaries containing another list of dictionaries to dataframe
body: <p>I tried to look for the solution and I am unable to get 1. I have the following output from an api in python.</p>
  
  <pre><code>insights = [ &lt;Insights&gt; {
      "account_id": "1234",
      "actions": [
          {
              "action_type": "add_to_cart",
              "value": "8"
          },
          {
              "action_type": "purchase",
              "value": "2"
          }
      ],
      "cust_id": "xyz123",
      "cust_name": "xyz",
  }, &lt;Insights&gt; {
      "account_id": "1234",
      "cust_id": "pqr123",
      "cust_name": "pqr",
  },  &lt;Insights&gt; {
      "account_id": "1234",
      "actions": [
          {
              "action_type": "purchase",
              "value": "45"
          }
      ],
      "cust_id": "abc123",
      "cust_name": "abc",
   }
   ]
  </code></pre>
  
  <p>I want the data frame something like this</p>
  
  <pre><code>- account_id    add_to_cart purchase    cust_id cust_name
  - 1234                    8        2    xyz123  xyz
  - 1234                                  pqr123  pqr
  - 1234                            45    abc123  abc
  </code></pre>
  
  <p>When I use the following </p>
  
  <pre><code>&gt; insights_1 = [x for x in insights]
  
  &gt; df = pd.DataFrame(insights_1)
  </code></pre>
  
  <p>I get the following</p>
  
  <pre><code>- account_id                                       actions  cust_id cust_name
  - 1234  [{'value': '8', 'action_type': 'add_to_cart'},{'value': '2', 'action_type': 'purchase'}]                                    xyz123  xyz
  - 1234                                              NaN     pqr123  pqr
  - 1234  [{'value': '45', 'action_type': 'purchase'}]        abc123  abc
  </code></pre>
  
  <p>How do I move ahead with this?</p>