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

generate dfs in obsm and varm #11

Open
rcannood opened this issue Nov 14, 2024 · 1 comment
Open

generate dfs in obsm and varm #11

rcannood opened this issue Nov 14, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@rcannood
Copy link
Member

Description of feature

It's also possible to store data frames in obsm and varm:

import anndata as ad

adata = ad.AnnData(
  obs=pd.DataFrame(
    index=["a", "b", "c"],
  ),
  obsm={
    "df": pd.DataFrame(
      {
        "a": [1, 2, 3],
        "b": [4, 5, 6],
      },
      index=["a", "b", "c"],
    )
  },
)

Would it be possible to add these to the generators as well?

@LouiseDck
Copy link
Collaborator

LouiseDck commented Nov 14, 2024

Yes, Will do!
Related, I think we should also generate data frames in .uns as well, which we currently don't.

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

No branches or pull requests

2 participants