pyarrow.csv.read_csv

pyarrow.csv.read_csv(input_file, read_options=None, parse_options=None, convert_options=None, MemoryPool memory_pool=None)

Read a Table from a stream of CSV data.

Parameters:
  • input_file (string, path or file-like object) – The location of CSV data. If a string or path, and if it ends with a recognized compressed file extension (e.g. “.gz” or “.bz2”), the data is automatically decompressed when reading.
  • read_options (ReadOptions, optional) – Options for the CSV reader (see ReadOptions constructor for defaults)
  • parse_options (ParseOptions, optional) – Options for the CSV parser (see ParseOptions constructor for defaults)
  • convert_options (ConvertOptions, optional) – Options for converting CSV data (see ConvertOptions constructor for defaults)
  • memory_pool (MemoryPool, optional) – Pool to allocate Table memory from
Returns:

pyarrow.Table – Contents of the CSV file as a in-memory table.