Backport PR 4012 on branch 1.5.x (fix(cytovi): fix subsample() groupby crash on pandas =3.0)
Backport PR 4012 on branch 1.5.x (fix(cytovi): fix subsample() groupby crash on pandas =3.0): a task in lifesci-single-cell-spatial-swe-envs-nocap (Harbor dataset). Title: Backport PR 4012 on branch 1.5.x (fix(cytovi): fix subsample() groupby crash on pandas =3.0)
The task
**Title:** Backport PR #4012 on branch 1.5.x (fix(cytovi): fix subsample() groupby crash on pandas>=3.0)
Part of scalingX/lifesci-single-cell-spatial-swe-envs-nocap.