tiledbsoma.DataFrame.write

DataFrame.write(values: Table, platform_config: Dict[str, Mapping[str, Any]] | object | None = None) Self

Writes an Arrow table to the persistent object. As duplicate index values are not allowed, index values already present in the object are overwritten and new index values are added.

Parameters:
  • values

    An Arrow table containing all columns, including the index columns. The schema for the values must match the schema for the DataFrame.

    If a column is of categorical type in the schema and a flattened/non-categorical column is presented for data on write, a ValueError is raised. If a column is of non-categorical type in the schema and a categorical column is presented for data on write, the data are written as an array of category values, and the category-type information is not saved.

  • platform_config

    Pass in parameters for tuning writes. Example: platform_config = tiledbsoma.TileDBWriteOptions(

    **{“sort_coords”: False, “consolidate_and_vacuum”: True}

    )

Raises:
  • TypeError – If the values parameter is an unsupported type.

  • ValueError – If the values parameter is an empty table.

  • SOMAError – If the object is not open for writing.

Lifecycle

Maturing.