Hello
For Pandas 2.0+, the line:
https://github.com/gzampieri/coco_paper/blob/1bd854da1354fbd14797491834ea11c45cc5f2a9/bin/coco/coco.py#L48
must be replaced by:
count_sums = self.gene_expr[s].groupby(level=0).sum()
This expression is compatible for Pandas <2.0 as well.
Ref: "Removed the level keyword in DataFrame and Series aggregations; use groupby instead (GH39983)" (release note 2.0)
Best