title: How to convert bytes data into a python pandas dataframe?
body: <p>I would like to convert 'bytes' data into a Pandas dataframe. </p>
  
  <p>The data looks like this (few first lines):</p>
  
  <pre><code>    (b'#Settlement Date,Settlement Period,CCGT,OIL,COAL,NUCLEAR,WIND,PS,NPSHYD,OCGT'
   b',OTHER,INTFR,INTIRL,INTNED,INTEW,BIOMASS\n2017-01-01,1,7727,0,3815,7404,3'
   b'923,0,944,0,2123,948,296,856,238,\n2017-01-01,2,8338,0,3815,7403,3658,16,'
   b'909,0,2124,998,298,874,288,\n2017-01-01,3,7927,0,3801,7408,3925,0,864,0,2'
   b'122,998,298,816,286,\n2017-01-01,4,6996,0,3803,7407,4393,0,863,0,2122,998'
  </code></pre>
  
  <p>The columns headers appear at the top. each subsequent line is a timestamp and numbers.</p>
  
  <p>Is there a straightforward way to do this?</p>
  
  <p>Thank you very much</p>
  
  <p>@Paula Livingstone:</p>
  
  <p>This seems to work: </p>
  
  <pre><code>s=str(bytes_data,'utf-8')
  
  file = open("data.txt","w") 
  
  file.write(s)
  df=pd.read_csv('data.txt')
  </code></pre>
  
  <p>maybe this can be done without using a file in between.</p>