Skip to content

Include name of index column for Parquet tables in spatialdata_attrs for shapes/points #958

@keller-mark

Description

@keller-mark

Is your feature request related to a problem? Please describe.

When accessing the Parquet data for points and shapes on-disk (for Vitessce), it is currently unclear which column of the Parquet table to treat as the dataframe index column.

Describe the solution you'd like

Similar to how AnnData's on-disk representation for dataframes (e.g., adata.obs) specifies the name of the index column in the Zarr attributes _index field, SpatialData could do this as well, with an _index field in the spatialdata_attrs metadata.

Image

My current workaround is to look for the field index_columns of the Parquet tables' pandas metadata, but it is unclear to me if this will always work as I do not see this documented. This approach also requires loading the Parquet table schema first, whereas storing in .zattrs would allow to directly specify Parquet columns to load (without always needing to load the Parquet metadata as a first step).

Image

Describe alternatives you've considered
Continue to use the pandas metadata and document it in the Design Doc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions