spatialdata.get_values#
- spatialdata.get_values(value_key, element=None, sdata=None, element_name=None)#
Get the values from the element, from any location: df columns, obs or var columns (table).
- Parameters:
value_key (
str
|list
[str
]) – Name of the column/channel name to get the values fromelement (
Union
[SpatialImage
,MultiscaleSpatialImage
,GeoDataFrame
,DataFrame
,None
] (default:None
)) – SpatialElement object; either element or (sdata, element_name) must be providedsdata (
Optional
[SpatialData
] (default:None
)) – SpatialData object; either element or (sdata, element_name) must be providedelement_name (
Optional
[str
] (default:None
)) – Name of the element; either element or (sdata, element_name) must be provided
- Return type:
DataFrame
- Returns:
: DataFrame with the values requested.
Notes
The index of the returned dataframe is the instance_key of the table for the specified element.
If the element is a labels, the eventual background (0) is not included in the dataframe of returned values.