pipette.read¶
- pipette.read(path: str | PathLike[str], *, format: str | None = None, index: bool = True, colnames: bool | list[str] = True, skip: int = 0, nmax: int | None = None, comment: str | None = None, na_strings: list[str] | None = None, make_names: bool = True, sheet: int | str | None = None, quiet: bool = False, **kwargs: Any) Any¶
Read data from a file.
- Parameters:
path (str or os.PathLike) – Local file path or URL.
format (str, optional) – Force a specific format (e.g.
"csv"). Auto-detected by default.index (bool) – Detect a row name column and set it as the index.
colnames (bool or list of str) – Use first row as column names, or provide custom names.
skip (int) – Number of rows to skip.
nmax (int, optional) – Maximum number of rows to read.
comment (str, optional) – Lines starting with this are filtered (for lines format).
na_strings (list of str, optional) – Strings to treat as NA.
make_names (bool) – Sanitize column names to valid Python identifiers.
sheet (int or str, optional) – Sheet name or index for Excel files.
quiet (bool) – Suppress messages.
**kwargs – Extra arguments passed to the underlying reader.
- Returns:
Data read from
path, type depends on format.- Return type: