

@classmethod
def from_csv(cls, f, name='from_csv_table', sniff_limit=None, column_ids=None, blanks_as_nulls=True, column_offset=1, infer_types=True, no_header_row=False, **kwargs):
    '\n        Creates a new Table from a file-like object containing CSV data.\n\n        Note: the column_ids argument will cause only those columns with a matching identifier\n        to be parsed, type inferred, etc. However, their order/index property will reflect the\n        original data (e.g. column 8 will still be "order" 7, even if it\'s the third column\n        in the resulting Table.\n        '
    contents = f.read()
    if (sniff_limit is None):
        kwargs['dialect'] = sniff_dialect(contents)
    elif (sniff_limit > 0):
        kwargs['dialect'] = sniff_dialect(contents[:sniff_limit])
    f = six.StringIO(contents)
    rows = agate.csv.reader(f, **kwargs)
    try:
        if no_header_row:
            row = next(rows)
            rows = itertools.chain([row], rows)
            headers = make_default_headers(len(row))
        else:
            headers = next(rows)
    except StopIteration:
        headers = []
        pass
    if (no_header_row or column_ids):
        column_ids = parse_column_identifiers(column_ids, headers, column_offset)
        headers = [headers[rows] for c in column_ids]
    else:
        column_ids = range(len(headers))
    data_columns = [[] for c in headers]
    width = len(data_columns)
    for (i, row) in enumerate(rows):
        j = 0
        for (j, d) in enumerate(row):
            try:
                data_columns[j].append(row[column_ids[j]].strip())
            except IndexError:
                break
        j += 1
        while (j < width):
            data_columns[j].append(None)
            j += 1
    columns = []
    for (i, c) in enumerate(data_columns):
        columns.append(Column(column_ids[i], headers[i], c, blanks_as_nulls=blanks_as_nulls, infer_types=infer_types))
    return Table(columns, name=name)

dataset/ETHPy150Open wireservice/csvkit/csvkit/table.py Table.from_csv/VarMisuse@214/433 `c`->`rows`