Skip to content

Commit dda3ffb

Browse files
committed
xenium conversion of index.index to str
1 parent b9c3262 commit dda3ffb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/spatialdata_io/readers/xenium.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,8 @@ def _poly(arr: ArrayLike) -> Polygon:
373373

374374
group_by = df.groupby(XeniumKeys.CELL_ID)
375375
index = pd.Series(group_by.indices.keys())
376+
# convert the index to str since we will compare it with an AnnData object, where the index is a str
377+
index.index = index.index.astype(str)
376378
index = _decode_cell_id_column(index)
377379
out = Parallel(n_jobs=n_jobs)(
378380
delayed(_poly)(i.to_numpy())

0 commit comments

Comments
 (0)