title: Way to read first few lines for pandas dataframe
body: <p>Is there a built-in way to use <code>read_csv</code> to read only the first <code>n</code> lines of a file without knowing the length of the lines ahead of time? I have a large file that takes a long time to read, and occasionally only want to use the first, say, 20 lines to get a sample of it (and prefer not to load the full thing and take the head of it).</p>
  
  <p>If I knew the total number of lines I could do something like <code>footer_lines = total_lines - n</code> and pass this to the <code>skipfooter</code> keyword arg. My current solution is to manually grab the first <code>n</code> lines with python and StringIO it to pandas:</p>
  
  <pre><code>import pandas as pd
  from StringIO import StringIO
  
  n = 20
  with open('big_file.csv', 'r') as f:
      head = ''.join(f.readlines(n))
  
  df = pd.read_csv(StringIO(head))
  </code></pre>
  
  <p>It's not that bad, but is there a more concise, 'pandasic' (?) way to do it with keywords or something?</p>