pandas.DataFrame.from_csv

classmethod DataFrame.from_csv(path, header=0, sep=', ', index_col=0, parse_dates=True, encoding=None, tupleize_cols=False)

Read delimited file into DataFrame

Parameters :

path : string file path or file handle / StringIO

header : int, default 0

Row to use at header (skip prior rows)

sep : string, default ‘,’

Field delimiter

index_col : int or sequence, default 0

Column to use for index. If a sequence is given, a MultiIndex is used. Different default from read_table

parse_dates : boolean, default True

Parse dates. Different default from read_table

tupleize_cols : boolean, default True

write multi_index columns as a list of tuples (if True) or new (expanded format) if False)

Returns :

y : DataFrame

Notes

Preferable to use read_table for most general purposes but from_csv makes for an easy roundtrip to and from file, especially with a DataFrame of time series data