python study notes common function parameter data read 3.1_

A, read_table / read_csv common function parameters

1, path: string indicating the file system location, url type or file objects

 

2, sep, or delimiter: used to separate each character sequence line fields or regular expressions

 

3, header: as a line number column name, the default is 0 (first line), if the name is not listed, it should be specified as None

 

4, names: a list of results with column names, and header = None.

 

5, index_col:  as a result rows indexed column number or name can be a single name / number, may be a layered index.

 

 

6, SkipRows : starting from the beginning of the file, you need to skip a list of the number of lines or line number.

 

7, na_values: sequence of values replaced with NA needs.

Missing values ​​displayed by default (represented by NAN) is NULL

na_nalues ​​specified missing values ​​are displayed (indicated by NAN) is NULL

A dictionary form, na_values ​​can specify different column missing values ​​are displayed at different values

 

 8, nrows: block read file

max_rows: before you try large files, we can first adjust the display settings pandas, making it more compact

If the read points to a small part of the line, may indicate nrows:

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/dlp-527/p/11824875.html