[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
b5e8ee979f
commit
d45bee628e
@ -77,10 +77,13 @@ def load_timeseries(fn, years, countries, powerstatistics=True):
|
||||
|
||||
pattern = "power_statistics" if powerstatistics else "transparency"
|
||||
pattern = f"_load_actual_entsoe_{pattern}"
|
||||
|
||||
def rename(s):
|
||||
return s[: -len(pattern)]
|
||||
|
||||
def date_parser(x):
|
||||
return dateutil.parser.parse(x, ignoretz=True)
|
||||
|
||||
return (
|
||||
pd.read_csv(fn, index_col=0, parse_dates=[0], date_parser=date_parser)
|
||||
.filter(like=pattern)
|
||||
|
@ -743,6 +743,7 @@ def prepare_costs(cost_file, config, Nyears):
|
||||
|
||||
def annuity_factor(v):
|
||||
return annuity(v["lifetime"], v["discount rate"]) + v["FOM"] / 100
|
||||
|
||||
costs["fixed"] = [
|
||||
annuity_factor(v) * v["investment"] * Nyears for i, v in costs.iterrows()
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user