pandas 0.7.3 documentation

pandas.io.parsers.read_table

pandas.io.parsers.read_table(filepath_or_buffer, sep='\t', header=0, index_col=None, names=None, skiprows=None, na_values=None, parse_dates=False, date_parser=None, nrows=None, iterator=False, chunksize=None, skip_footer=0, converters=None, verbose=False, delimiter=None, encoding=None)

Read general delimited file into DataFrame

Also supports optionally iterating or breaking of the file into chunks.

Parameters :

filepath_or_buffer : string or file handle / StringIO. The string could be

a URL. Valid URL schemes include http://, ftp://, and file://. For file:// URLs, a host is expected. For instance, a local file could be file://localhost/path/to/table.csv

sep : string, default t (tab-stop)

Delimiter to use

header : int, default 0

Row to use for the column labels of the parsed DataFrame

skiprows : list-like or integer

Row numbers to skip (0-indexed) or number of rows to skip (int)

index_col : int or sequence, default None

Column to use as the row labels of the DataFrame. If a sequence is given, a MultiIndex is used.

names : array-like

List of column names

na_values : list-like or dict, default None

Additional strings to recognize as NA/NaN. If dict passed, specific per-column NA values

parse_dates : boolean, default False

Attempt to parse dates in the index column(s)

date_parser : function

Function to use for converting dates to strings. Defaults to dateutil.parser

nrows : int, default None

Number of rows of file to read. Useful for reading pieces of large files

iterator : boolean, default False

Return TextParser object

chunksize : int, default None

Return TextParser object for iteration

skip_footer : int, default 0

Number of line at bottom of file to skip

converters : dict. optional

Dict of functions for converting values in certain columns. Keys can either be integers or column labels

verbose : boolean, default False

Indicate number of NA values placed in non-numeric columns

delimiter : string, default None

Alternative argument name for sep

encoding : string, default None

Encoding to use for UTF when reading/writing (ex. ‘utf-8’)

Returns :

result : DataFrame or TextParser