Skip to content

Commit

Permalink
fix: handle FutureWarning raised by pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
rouille committed Nov 2, 2022
1 parent b77b3ed commit 92ddfbd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion powersimdata/design/investment/investment_costs.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ def get_branch_mult(x, bus_reg, ac_reg_mult, branch_lookup_alerted=set()):
# Average the multipliers for branches (transformer regions should match)
regions = (x.from_region, x.to_region)
region_mults = ac_reg_mult.loc[ac_reg_mult.name_abbr.isin(regions)]
region_mults = region_mults.groupby(["kV", "MW"]).mean().reset_index()
region_mults = (
region_mults.groupby(["kV", "MW"]).mean(numeric_only=True).reset_index()
)

mult_lookup_kV = region_mults.loc[ # noqa: N806
(region_mults.kV - max_kV).abs().idxmin()
Expand Down

0 comments on commit 92ddfbd

Please sign in to comment.