tiledbsoma.PointCloudDataFrame.create

classmethod PointCloudDataFrame.create(uri: str, *, schema: Schema, coordinate_space: Sequence[str] | CoordinateSpace = ('x', 'y'), domain: Sequence[tuple[Any, Any] | list[Any] | None] | None = None, platform_config: Dict[str, Mapping[str, Any]] | object | None = None, context: SOMATileDBContext | None = None, tiledb_timestamp: int | datetime | None = None) Self

Creates a new PointCloudDataFrame at the given URI.

The schema of the created point cloud dataframe will include a column named soma_joinid of type pyarrow.int64, with negative values disallowed, and at least one axis with numeric type. If a soma_joinid column is present in the provided schema, it must be of the correct type. If the soma_joinid column is not provided, one will be added.

The schema of the created point cloud must contain columns for the axes in the coordinate_space. These columns followed by the soma_joinid will be index columns for the point cloud dataframe.

Parameters:
  • uri – The URI where the dataframe will be created.

  • schema – Arrow schema defining the per-column schema. This schema must define all columns, including columns to be named as index columns. If the schema includes types unsupported by the SOMA implementation, a ValueError will be raised.

  • coordinate_space – Either the coordinate space or the axis names for the coordinate space the point cloud is defined on.

  • domain – A sequence of tuples, each specifying the range of storable values for an index column. Must contain a domain for each axis and the soma_joinid. For example, for a floating-pointing 2D coordinate space the domain domain=[(-10.5, 10.5), (0, 5.5), (0, 10_0000)] indicates values in the 2D region (-10.5, 10.5) x (0, 5.5) with soma_joinid in the range (0, 10_000) (inclusive) are valid. Leaving the domain as None is deprecated.

Returns:

The newly created point cloud, opened for writing.

Lifecycle

Experimental.