title: How to normalize json file containing a list (that should be kept as a list) in Python | Pandas?
body: <p>I'm trying to use the json_normalize function to convert a json file into a dataframe.</p>
  <h2>Source JSON</h2>
  <ul>
  <li><p>The json is a list of dictionaries that look something like this:</p>
  <pre><code>{
        &quot;sport_key&quot;: &quot;basketball_ncaab&quot;,
        &quot;sport_nice&quot;: &quot;NCAAB&quot;,
        &quot;teams&quot;: [
            &quot;Bryant Bulldogs&quot;,
            &quot;Wagner Seahawks&quot;
        ],
        &quot;commence_time&quot;: 1608152400,
        &quot;home_team&quot;: &quot;Bryant Bulldogs&quot;,
        &quot;sites&quot;: [
            {
                &quot;site_key&quot;: &quot;marathonbet&quot;,
                &quot;site_nice&quot;: &quot;Marathon Bet&quot;,
                &quot;last_update&quot;: 1608156452,
                &quot;odds&quot;: {
                    &quot;h2h&quot;: [
                        1.28,
                        3.54
                    ]
                }
            },
            {
                &quot;site_key&quot;: &quot;sport888&quot;,
                &quot;site_nice&quot;: &quot;888sport&quot;,
                &quot;last_update&quot;: 1608156452,
                &quot;odds&quot;: {
                    &quot;h2h&quot;: [
                        1.13,
                        5.8
                    ]
                }
            },
            {
                &quot;site_key&quot;: &quot;unibet&quot;,
                &quot;site_nice&quot;: &quot;Unibet&quot;,
                &quot;last_update&quot;: 1608156434,
                &quot;odds&quot;: {
                    &quot;h2h&quot;: [
                        1.13,
                        5.8
                    ]
                }
            }
        ],
        &quot;sites_count&quot;: 3
    }
  </code></pre>
  </li>
  </ul>
  <p>The problem is that one of the future columns contains a list (which should be the case), but including this column in the meta part of the json_normalize function throws the following error:</p>
  <pre><code>ValueError: operands could not be broadcast together with shape (22,) (11,)
  </code></pre>
  <p>The error appears when I try to add &quot;teams&quot; in the list in the following code:</p>
  <pre><code>pd.json_normalize(data, 'sites', ['sport_key', 'sport_nice', 'home_team', 'teams'])
  </code></pre>