'Extract `self.sample_size` rows from the CSV file and analyze their
data-types.
:param str file_or_name: A string filename or a file handle.
:param reader_kwargs: Arbitrary parameters to pass to the CSV reader.
:returns: A 2-tuple containing a list of headers and list of rows
read from the CSV file.'

def extract_rows(self, file_or_name, **reader_kwargs):

    rows = []
    rows_to_read = self.sample_size
    with self.get_reader(file_or_name, **reader_kwargs) as reader:
        if self.has_header:
            rows_to_read += 1
        for (i, row) in enumerate(reader):
            rows.append(row)
            if (i == self.sample_size):
                break
    if self.has_header:
        (header, rows) = (rows[0], rows[1:])
    else:
        header = [('field_%d' % i) for i in range(len(rows[0]))]
    return (header, rows)
