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 objectelement_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.
See also
match_table_to_element
Function to match a table to a spatial element.
join_spatialelement_table
General function, to join spatial elements with a table with more control.