title: How to append a list as a row in pandas.DataFrame()?
body: <p>I am iteratively reading a log file and parsing/extracting data and would like to append that to a dataframe.</p>
  
  <pre><code>df = pd.DataFrame([], columns=['item','price','qty','sold'])
  with open("mylogfile") as fh:
      for line in fh:
          data = extract_data(line)
          df.append(data) ## ?
  
  
  def extract_data(line):
     # parse and get values as a list
     return list_values
  </code></pre>
  
  <p>Update:
  I get the following error:
  ValueError: Shape of passed values is (0, 0), indices imply (4, 0)    </p>
  
  <p>Also, My log file has data in the format</p>
  
  <pre><code>item,2,price,4.5,qty,17,sold,11
  item,12,price,14.5,qty,7,sold,4
  item,2,price,4.5,qty,13,sold,2
  </code></pre>
  
  <p>Edit2: (the actual file is, and i am only interested in the 'item' line</p>
  
  <pre><code>item,2,price,4.5,qty,17,sold,11
  a,12,b,14,c,18,d,15,e16
  item,12,price,14.5,qty,7,sold,4
  x,4,y,1,z,81
  a,12,b,14,c,18,d,15,e16
  a,14,b,11,c,8,d,51,e26
  item,2,price,4.5,qty,13,sold,2
  x,14,y,11,z,8
  </code></pre>