strict=False hinzugefügt wie in der Fehlermeldung vorgeschlagen

main
mmaurostoffel 2025-01-12 11:20:39 +01:00
parent 99a112df24
commit f114eb7f5a
2 changed files with 2 additions and 3 deletions

View File

@ -35,5 +35,4 @@ def property_capacities(id: int):
max_capacity_perc = 100 / max_capacity max_capacity_perc = 100 / max_capacity
result['capacities'].append(round(max_capacity_perc * row['sum'], 2)) result['capacities'].append(round(max_capacity_perc * row['sum'], 2))
result['capacities'].reverse() result['capacities'].reverse()
return result return result

View File

@ -33,7 +33,7 @@ def region_capacities(id: int):
gridData.append([row['ScrapeDate'], sum_hor, calDF.width]) gridData.append([row['ScrapeDate'], sum_hor, calDF.width])
# Create Aggregates of values # Create Aggregates of values
df = pl.DataFrame(gridData) df = pl.DataFrame(gridData, strict=False)
df_count = df.group_by("column_0").agg(pl.col("column_1").count()) df_count = df.group_by("column_0").agg(pl.col("column_1").count())
df_sum = df.group_by("column_0").agg(pl.col("column_1").sum()) df_sum = df.group_by("column_0").agg(pl.col("column_1").sum())
df_numDays = df.group_by("column_0").agg(pl.col("column_2").max()) df_numDays = df.group_by("column_0").agg(pl.col("column_2").max())