Skip to content

Commit

Permalink
Replace deprecated polars count with len
Browse files Browse the repository at this point in the history
  • Loading branch information
larsevj committed Dec 13, 2024
1 parent 1af592d commit 8859d26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ert/gui/ertwidgets/models/ertsummary.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ def getParameters(self) -> tuple[list[str], int]:
def getObservations(self) -> list[ObservationCount]:
counts: list[ObservationCount] = []
for df in self.ert_config.observations.values():
counts.extend(df.group_by("observation_key").count().to_dicts()) # type: ignore
counts.extend(df.group_by("observation_key").len(name="count").to_dicts()) # type: ignore

return sorted(counts, key=lambda k: k["observation_key"].lower())

0 comments on commit 8859d26

Please sign in to comment.