title: How to transform JSON SList to pandas dataframe?
body: <pre><code>a = ['{&quot;type&quot;: &quot;book&quot;,', 
       '&quot;title&quot;: &quot;sometitle&quot;,', 
       '&quot;author&quot;: [{&quot;name&quot;: &quot;somename&quot;}],', 
       '&quot;year&quot;: &quot;2000&quot;,', 
       '&quot;identifier&quot;: [{&quot;type&quot;: &quot;ISBN&quot;, &quot;id&quot;: &quot;1234567890&quot;}],', 
       '&quot;publisher&quot;: &quot;somepublisher&quot;}', '',
       '{&quot;type&quot;: &quot;book&quot;,', '
       '&quot;title&quot;: &quot;sometitle2&quot;,', 
       '&quot;author&quot;: [{&quot;name&quot;: &quot;somename2&quot;}],', 
       '&quot;year&quot;: &quot;2001&quot;,', 
       '&quot;identifier&quot;: [{&quot;type&quot;: &quot;ISBN&quot;, &quot;id&quot;: &quot;1234567890&quot;}],', 
       '&quot;publisher&quot;: &quot;somepublisher&quot;}', '']
  </code></pre>
  <p>I have this convoluted SList and I would like to ultimately get it into a tidy pandas dataframe.</p>
  <p>I have tried a number of things, for example:</p>
  <pre><code>i = iter(a)
  b = dict(zip(i, i))
  </code></pre>
  <p>Unfortunately, this creates a dictionary that looks even worse:</p>
  <pre><code>{'{&quot;type&quot;: &quot;book&quot;,':
  ...
  </code></pre>
  <p>Where I had an SList of dictionaries, I now have a dictionary of dictionaries.</p>
  <p>I also tried</p>
  <pre><code>pd.json_normalize(a)
  </code></pre>
  <p>but this throws an error message <code>AttributeError: 'str' object has no attribute 'values'</code></p>
  <p>I also tried</p>
  <pre><code>r = json.dumps(a.l)
  loaded_r = json.loads(r)
  print(loaded_r)
  </code></pre>
  <p>but this yields a list</p>
  <pre><code>['{&quot;type&quot;: &quot;book&quot;,',
  ...
  </code></pre>
  <p>Again, in the end I'd like to have a pandas dataframe like this</p>
  <pre><code>type   title       author     year ...
  
  book   sometitle   somename   2000 ...
  book   sometitle2 somename2   2001
  
  </code></pre>
  <p>Obviously, I haven't really gotten to the point where I can feed the data to a pandas function. Everytime I did that, the functions screamed at me...</p>