scverse / scverse/spatialdata

Let PointsModel be a dask or pandas dataframe

Open
#153 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement ✨
Dominant language
Python
Stars
394
Forks
95
Avg merge
4d 3h
Merged PRs (30d)
7

Description

For many use cases (like xenium) points can be handled completley in memory without issue. Given that, and all the reasons the first "best practice" in the dask dataframes documentation is "use pandas", I think it's worth supporting pandas dataframes.

They have matched APIs, so it's possible many functions would not need modification to support both. For functions where we require one or the other, we can use a sklearn.utils.check_array style utility to do coercion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with PointsModel and trace the existing dataframe handling to identify which functions assume a Dask dataframe. Compare the matched pandas and Dask APIs, and review sklearn.utils.check_array as the proposed model for coercion. Done means PointsModel and its applicable functions support both dataframe types without breaking cases that require one type.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.