title: Convert nested JSON to pandas DataFrame
body: <p>I have a nested JSON, where I want to extact part of it and make it into a pandas DataFrame. It just ain't working whatever stackoverflow post I look through!</p>
  
  <p>I tried different ways using already existing posts but can't get it working</p>
  
  <p>JSON from "result"</p>
  
  <pre><code> b'{"coin":{"id":363,"name":"Bitcoin","code":"BTC"},"dataType":"marketCap","baseCurrency":"USD","data":[{"date":"2018-01-12","marketCap":"232547809668.32000000"},{"date":"2018-01-13","marketCap":"241311607656.32000000"}
  </code></pre>
  
  <p>CODE:</p>
  
  <pre><code>http = urllib3.PoolManager()
  url = 'https://www.cryptocurrencychart.com/api/coin/history/363/2018-01-12/2019-01-12/marketCap/USD'
  headers = urllib3.util.make_headers(basic_auth='xxx:xxx')
  r = http.request('GET', url , headers = headers) 
  result = r.data
  
  df = json_normalize(result['data'])
  df.set_index('date', inplace = True)
  </code></pre>
  
  <p>Result is type: bytes</p>
  
  <p>ERROR:</p>
  
  <pre><code>TypeError: byte indices must be integers or slices, not str
  </code></pre>
  
  <p>Expected DataFrame</p>
  
  <pre><code>            BTCmarketCap
  2019-01-01  xxxxxxx 
  2019-01-02  xxxxxx
  </code></pre>