pandas
Reads CSV data into a DataFrame with configurable parsing and conversion.
- Downloads / mo
- 710.3M
- Stars
- 49.6K
- Last release
- 3.1.1
- License
- BSD-3-Clause
Strengths
- Controls column types and conversion. Set dtype, converters, and missing-value rules for each input.
- Returns configurable row chunks. Use chunksize or iterator when processing a CSV incrementally.
Limitations
- Low-memory mode still returns everything. Set chunksize or iterator when rows must be processed incrementally.
Quickstart
import pandas as pd from io import StringIO frame = pd.read_csv(StringIO("name,score\nAda,9\n"))
pandas examples
def load(self) -> pd.DataFrame: load_path = str(self._get_load_path()) if self._protocol == "file": # file:// protocol seems to misbehave on Windows # (<urlopen error file not on local host>), # so we don't join that back to the filepath; # storage_options also don't work with local paths return pd.read_csv(load_path, **self._load_args) load_path = f"{self._protocol}{PROTOCOL_DELIMITER}{load_path}" return pd.read_csv( load_path, storage_options=self._storage_options, **self._load_args )