spatialdata.match_element_to_table

spatialdata.match_element_to_table#

spatialdata.match_element_to_table(sdata, element_name, table_name)#

Filter the elements and make the indices match those in the table.

Parameters:
  • sdata (SpatialData) – SpatialData object

  • element_name (str | list[str]) – The name(s) of the spatial elements to be joined with the table. Not supported for Label elements.

  • table_name (str) – The name of the table to join with the spatial elements.

Return type:

tuple[dict[str, Any], AnnData]

Returns:

: A tuple containing the joined elements as a dictionary and the joined table as an AnnData object.