Skip to content

Commit

Permalink
fix pandas groupby.apply include groups deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
jgallowa07 committed Feb 22, 2024
1 parent eadaf5f commit 6222d26
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions multidms/model_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,10 +931,9 @@ def mut_type(mut):
.assign(mut_type=lambda x: x.mutation.apply(mut_type))
.reset_index()
.groupby(by=feature_cols)
.apply(
sparsity, include_groups=True
) # TODO This throws deprecation warning
.drop(columns=feature_cols + ["mutation"])
# .apply(sparsity, include_groups=True)
.apply(sparsity, include_groups=False)
# .drop(columns=feature_cols + ["mutation"])
.reset_index(drop=False)
.melt(id_vars=feature_cols, var_name="mut_param", value_name="sparsity")
)
Expand Down

0 comments on commit 6222d26

Please sign in to comment.