title: Pandas read_table use first column as index
body: <p>I have a little bit of a problem here. I have a txt file containing lines of the form (let's say for line 1):</p>
  
  <pre><code>id1-a1-b1-c1
  </code></pre>
  
  <p>I want to load it in a data frame using pandas with the index being the id's and the columns name being 'A', 'B', 'C' and the values the corresponding ai, bi, ci</p>
  
  <p>at the end I want the dataframe to look like:</p>
  
  <pre><code>    'A'   'B'  'C'
  id1  a1    b1   c1
  id2  a2    b2   c2
  ...   ...   ...  ...
  </code></pre>
  
  <p>I may want to read by chunks in the file is large but let's assume I read at once:</p>
  
  <pre><code>with open('file.txt') as f:
      table = pd.read_table(f, sep='-', index_col=0, header=None,   lineterminator='\n')
  </code></pre>
  
  <p>and rename the columns</p>
  
  <pre><code>table.columns = ['A','B','C']
  </code></pre>
  
  <p>my current output is something like:</p>
  
  <pre><code>    'A'   'B'  'C'
  0
  id1  a1    b1   c1
  id2  a2    b2   c2
  ...   ...   ...  ...
  </code></pre>
  
  <p>there is an extra row that I can't explain</p>
  
  <p>Thanks </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>when I try to add the field</p>
  
  <pre><code>chunksize=20
  </code></pre>
  
  <p>and after doing:</p>
  
  <pre><code>for chunk in table:
      print(chunk)
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>pandas.parser.CParserError: Error tokenizing data. C error: Calling read(nbytes) on source failed. Try engine='python'.
  </code></pre>