Skip to content

Commit

Permalink
Fix polars mean calc
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeee committed Dec 18, 2023
1 parent 6437a9f commit e7f2400
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions buildstock_query/tools/upgrades_visualizer/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _get_plot(self, df, params: PlotParams):
for second_name, second_df in second_plots:
name = ','.join(second_name) if second_name else str(grp0)
count = len(second_df)
mean = pl.mean(second_df['value'])
mean = second_df['value'].mean()
if counter >= 500:
yvals.append(0.1)
xvals.append("Too many groups")
Expand All @@ -90,7 +90,7 @@ def _get_plot(self, df, params: PlotParams):
elif params.value_type == ValueTypes.count:
val = second_df['building_id'].n_unique()
else:
val = pl.mean(second_df['value'])
val = second_df['value'].mean()
val = float(val)
yvals.append(val)
xvals.append(name)
Expand Down

0 comments on commit e7f2400

Please sign in to comment.