pardata.loaders.table.CSVPandasLoader.load

CSVPandasLoader.load(path, options)

The type hint says Dict, because this loader will be handling those situations in the future, perhaps via a IteratingLoader class.

Parameters
  • path (Union[str, os.PathLike, Dict[str, str]]) – The path to the CSV file.

  • options (Dict[str, Any]) –

    • columns key specifies the data type of each column. Each data type corresponds to a Pandas’ supported dtype. If unspecified, then it is default.

    • delimiter key specifies the delimiter of the input CSV file.

    • no_header key specifies if the first row of the CSV file contains the headers. Defaults to False. If the value is set to anything “truthy” in Python, the first row of the CSV will be read as data.

    • encoding key specifies the encoding of the CSV file. Defaults to UTF-8.

Raises

TypeErrorpath is not a path object.

Returns

Data loaded into a pandas.DataFrame.

Return type

pandas.core.frame.DataFrame