Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to_df to include metadata #1400

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WeilerP
Copy link
Contributor

@WeilerP WeilerP commented Mar 6, 2024

Changes

  • Adds argument obs to include columns from .obs in generated metadata.

Related issues

Closes #1399.

@WeilerP
Copy link
Contributor Author

WeilerP commented Mar 6, 2024

I'll add unit tests once it's clear if this feature is desired and how to include it.

Add argument `obs` to include columns from `.obs`
in generated metadata.
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 84.19%. Comparing base (9452dd5) to head (fa07b95).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1400      +/-   ##
==========================================
- Coverage   86.27%   84.19%   -2.08%     
==========================================
  Files          36       36              
  Lines        5610     5613       +3     
==========================================
- Hits         4840     4726     -114     
- Misses        770      887     +117     
Flag Coverage Δ
gpu-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
anndata/_core/anndata.py 84.76% <80.00%> (-0.07%) ⬇️

... and 8 files with indirect coverage changes

@ivirshup
Copy link
Member

ivirshup commented Mar 6, 2024

Just to write down some edge cases:

  • What if there are repeated:
    • obs_names
    • var_names
  • What if (key in adata.obs.columns) and (key in adata.var_names)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include metadata when converting to Pandas DataFrame
2 participants