title: Create pandas DataFrame from values and list as efficiently as possible
body: <p>I am looping through a data set and get 2 key values that will be my index and an array of floats. Like so:</p>
  
  <pre><code>list_of_lists = []
  while True:
              data = file_stream.read(8)
              if not data:
                  break
              message_size = int.from_bytes(data, byteorder='little')
              message.ParseFromString(file_stream.read(message_size))
              data_list = [message.key1, message.key2]
              data_list.extend(message.Data)
              list_of_lists.append(data_list)
  return pandas.DataFrame.from_records(list_of_lists, index=['key1','key2'], columns=header_list)
  </code></pre>
  
  <p>If I comment out the data_list.extend it runs extremely fast. The extend makes it 50x slower.</p>
  
  <p>I have tried a number of things and can't figure out the optimal way to get the data into a dataframe. Any advice on how to speed this up would appreciated.</p>