Skip to content

Commit

Permalink
Update epoch_price_reduction.py
Browse files Browse the repository at this point in the history
  • Loading branch information
veronikasamborska1994 committed Feb 28, 2025
1 parent 23994bb commit dd6bc5a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Load a snapshot and create a meadow dataset."""

import pandas as pd
import numpy as np

from etl.helpers import PathFinder, create_dataset

Expand All @@ -26,7 +26,12 @@ def run(dest_dir: str) -> None:
#
tb = tb[["bench", "threshold_model", "end_date", "price_reduction_factor_per_year"]]
tb["year"] = 2025
# Convert price_reduction_factor_per_year to float
tb["price_reduction_factor_per_year"] = tb["price_reduction_factor_per_year"].astype(float)

# Express price_reduction_factor_per_year in logarithmic scale
tb["price_reduction_factor_per_year_log"] = np.log(tb["price_reduction_factor_per_year"])

tb = tb.drop(columns=["end_date"])
tb = tb.format(["bench", "threshold_model", "year"])

Expand Down

0 comments on commit dd6bc5a

Please sign in to comment.