pandas:powerful Python Data Analysis Toolkit

Source: Internet
Author: User

Pandas.read_csv

pandas.read_csv(Filepath_or_buffer,sep= ',',Delimiter=none,header= ' infer ',Names=none,Index_col=none,Usecols=none,Squeeze=false,Prefix=none,mangle_dupe_cols=true,Dtype=none,Engine=none,Converters=none,True_values=none,False_values=none,Skipinitialspace=false,Skiprows=none,Nrows=none,Na_values=none,keep_default_na=true,na_filter=true,Verbose=false,skip_blank_lines=true,Parse_dates=false,Infer_datetime_format=false,Keep_date_col=false,Date_parser=none,Dayfirst=false,Iterator=false,Chunksize=none,compression= ' infer ',Thousands=none,decimal= '. ',Lineterminator=none,quotechar= ' "',quoting=0,Escapechar=none,Comment=none,Encoding=none,Dialect=none,Tupleize_cols=false,error_bad_lines=true,warn_bad_lines=true,skipfooter=0,skip_footer=0,doublequote=true,Delim_whitespace=false,As_recarray=false,Compact_ints=false,Use_unsigned=false,low_memory=true,Buffer_lines=none,Memory_map=false,Float_precision=none)[source]

Read CSV (comma-separated) file into DataFrame

Dataframe = pandas.read_csv (' water_demand2009.csv ', header =none, Usecols=none, engine= ' python ', skipfooter=0)

Parameters:

filepath_or_buffer : str, pathlib. Path, Py._path.local.localpath or any object with a read () method (such as a file handle or Stringio)

header : int or List of ints, default ' infer '

    • Row number (s) to use as the column names, and the start of the data. Default behavior is as if set to 0 if no names passed, otherwise None.

usecols : array-like, default None

    • Return a subset of the columns. All elements in this array must either is positional (i.e. integer indices into the document columns) or strings that Corr Espond to column names provided either by the user in names or inferred from the document header row (s). For example, a valid usecols parameter would be [0, 1, 2] or [' foo ', ' Bar ', ' Baz ']. Using This parameter results in much faster parsing time and lower memory usage.

engine : { ' C ', ' Python '}, optional

    • Parser engine to use. The C engine was faster while the Python engine was currently more feature-complete.

Skipfooter : int, default 0

    • Number of lines at bottom of "file to skip" (Unsupported with engine= ' C ')

Returns: result:dataframe or TextParser

pandas:powerful Python Data Analysis Toolkit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.