Skip to content

Commit

Permalink
fix: set dropna to false to keep matrix dimensions (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielolsen authored Mar 16, 2022
1 parent f27ebcf commit b2c1dd6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion powersimdata/input/input_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ def distribute_demand_from_zones_to_buses(zone_demand, bus):
[pd.Series(bus["Pd"] / bus_zone_pd, name="zone_share"), bus["zone_id"]], axis=1
)
zone_bus_shares = bus_zone_share.pivot_table(
index="bus_id", columns="zone_id", values="zone_share", fill_value=0
index="bus_id",
columns="zone_id",
values="zone_share",
dropna=False,
fill_value=0,
)
bus_demand = zone_demand.dot(zone_bus_shares.T)

Expand Down

0 comments on commit b2c1dd6

Please sign in to comment.