diff --git a/etl/src/data/etl_property_capacities_weekdays.py b/etl/src/data/etl_property_capacities_weekdays.py index 56972ab..c16fcb2 100644 --- a/etl/src/data/etl_property_capacities_weekdays.py +++ b/etl/src/data/etl_property_capacities_weekdays.py @@ -25,10 +25,9 @@ def property_capacities_weekdays(id: int, scrapeDate: str): df_calendar = df_calendar.drop("dates") df_calendar = df_calendar.group_by(["weekday", "weekday_num"]).agg(pl.col("column_0").sum()) - df_calendar = df_calendar.with_columns((pl.col("column_0") / numWeeks).alias("column_0")) + df_calendar = df_calendar.with_columns((pl.col("column_0") / numWeeks * 100).alias("column_0")) df_calendar = df_calendar.sort('weekday_num') df_calendar = df_calendar.drop('weekday_num') - print(df_calendar) - result = {"scraping-date": scrapeDate, "weekday": df_calendar['weekday'].to_list(), 'capacities': df_calendar['column_0'].to_list()} + result = {"scraping-date": scrapeDate, "weekdays": df_calendar['weekday'].to_list(), 'capacities': df_calendar['column_0'].to_list()} return result \ No newline at end of file