spatialdata icon indicating copy to clipboard operation
spatialdata copied to clipboard

`join_sdata_spatialelement_table()` fails with non-unique `AnnData` obs

Open LucaMarconato opened this issue 1 year ago • 0 comments

When the AnnData object has obs that are not unique the join will fail because code like this table[joined_indices, :] require unique indices.

I think we should

  • [ ] modify the function _get_joined_table_indices() to return numerical indices
  • [ ] in general modify the loc in dataframes and the use of obs indices in anndata to use iloc and numerical indices instead

To test:

  1. make a table with some rows and obs.index not unique
  2. compute a left join

LucaMarconato avatar Mar 20 '24 02:03 LucaMarconato