Werte von 0-1 zu 0-100 angepasst closes #12

main
mmaurostoffel 2025-01-13 17:17:46 +01:00
parent 4487932f1b
commit d8d2d1e757
1 changed files with 1 additions and 2 deletions

View File

@ -77,7 +77,7 @@ def region_movingAverage(id: int, scrape_date_start_min: str):
values = df.select(pl.exclude("dates")) values = df.select(pl.exclude("dates"))
sum_hor = values.sum_horizontal() sum_hor = values.sum_horizontal()
sum_hor = sum_hor / num_properties[arrayCunter] / 2 sum_hor = sum_hor / num_properties[arrayCunter] / 2 * 100
arrayCunter += 1 arrayCunter += 1
newDF = dates.with_columns(sum_hor=pl.Series(sum_hor)) newDF = dates.with_columns(sum_hor=pl.Series(sum_hor))
@ -109,6 +109,5 @@ def region_movingAverage(id: int, scrape_date_start_min: str):
# Add moving_averages to df # Add moving_averages to df
outDF = outDF.with_columns(moving_averages=pl.Series(moving_averages)) outDF = outDF.with_columns(moving_averages=pl.Series(moving_averages))
result = {'dates':outDF.get_column('dates').to_list(), 'cap_earlierTimeframe':outDF.get_column('sum_hor_predict').to_list(), 'cap_laterTimeframe':outDF.get_column('sum_hor_actual').to_list(), 'movAvg':outDF.get_column('moving_averages').to_list(),} result = {'dates':outDF.get_column('dates').to_list(), 'cap_earlierTimeframe':outDF.get_column('sum_hor_predict').to_list(), 'cap_laterTimeframe':outDF.get_column('sum_hor_actual').to_list(), 'movAvg':outDF.get_column('moving_averages').to_list(),}
return result return result