`anndata.acc` based API for `obs_df`,`var_df`
Open
Nobody has claimed this yet.
Area – API
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
What kind of feature would you like to request?
Additional function parameters / changed functionality / changed defaults?
Please describe your wishes
Should just be something like this, but making sure that it works for AdRefs as well, handles collisions, …
def df(adata: AnnData, accs: Mapping[str, AnyAcc | AdRef] | Iterable[AnyAcc | AdRef]) -> pd.DataFrame:
chunks = (
{k: adata[acc] for k, acc in accs.items()}
if isinstance(accs, Mapping)
else [adata[acc] for acc in accs]
)
pd.concat(chunks, axis=1)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the existing obs_df and var_df implementations and inspect how the anndata.acc APIs handle AnyAcc and AdRef; the issue provides no file or test paths. Compare the proposed DataFrame assembly with current collision behavior, then add coverage for mappings, iterables, AdRefs, and collisions once the intended API is confirmed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas, python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100