Skip to content

sum() method was changed in Pandas 2.0+  #1

@michaelpierrelee

Description

@michaelpierrelee

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions