pipette.write

pipette.write(obj: Any, path: str | PathLike[str], *, format: str | None = None, overwrite: bool = True, index: bool = True, quiet: bool = False, **kwargs: Any) Path | str

Write data to a file.

Parameters:
  • obj (object) – Data to write. DataFrames, dicts, lists, and other types are supported depending on the format.

  • path (str or os.PathLike) – Output file path. Supports local paths and s3:// URIs.

  • format (str, optional) – Force a specific format (e.g. "csv"). Auto-detected from the extension by default.

  • overwrite (bool) – Overwrite existing files. Raises FileExistsError if False and the file exists.

  • index (bool) – Include the row index in the output.

  • quiet (bool) – Suppress messages.

  • **kwargs – Extra arguments passed to the underlying writer.

Returns:

Path to the written file. A Path for a local target, or the str URI unchanged for an s3:// target.

Return type:

pathlib.Path or str