Skip to content

Commit

Permalink
Make region_key a categorical when exporting to SpatialData (#3588) (#…
Browse files Browse the repository at this point in the history
…3589)

Co-authored-by: Julia Dark <[email protected]>
  • Loading branch information
github-actions[bot] and jp-dark authored Jan 21, 2025
1 parent 98fd4fd commit 570d761
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apis/python/src/tiledbsoma/_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ def to_spatialdata( # type: ignore[no-untyped-def]
"Unable to export to SpatialData; exported assets have "
"overlapping observations."
) from err
ad.obs["region_key"] = pd.Categorical(ad.obs["region_key"])
regions = list(region_joinids.keys())
region_key = "region_key"
instance_key = "instance_key"
Expand Down

0 comments on commit 570d761

Please sign in to comment.