Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 11 Mar 05:13
· 6 commits to refs/heads/main since this release
4390be9

Changes

🚀 Features

  • Look at names in closure for nw.Expr instead of subclassing it. @srivarra (#50)

This release features better group by support and improved stability w.r.t Narwhal's Expr. Instead of subclassing nw.Expr, we have simplified a significant amount by looking at the closure to get column names for group by's. Group By's now have a repr. Here is an example below:

first_group = next(adata.an.group_by(
    obs=an.col(["Cell_label"]),
    var=an.col(["feature_type"]),
    copy=False
)

Note that if copy=False, the GroupByAnnData object will be a view of the original AnnData object. If you want a copy, you can set copy=True.

first_group
GroupByAnnData:
  ├── Observations:
  │   └── Cell_label: Lymphomyeloid prog
  ├── Variables:
  │   └── feature_type: protein_coding
  └── AnnData:
      View of AnnData object with n_obs × n_vars = 913 × 445
      ...