Skip to content

Commit

Permalink
fix include_results in select_subnet toolbox function
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffenMeinecke committed Sep 24, 2019
1 parent bd233d6 commit b3bfc0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pandapower/toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,8 @@ def select_cost_df(net, p2, cost_type):

if include_results:
for table in net.keys():
if net[table] is None:
if net[table] is None or (isinstance(net[table], pd.DataFrame) and not
net[table].shape[0]):
continue
elif table == "res_bus":
p2[table] = net[table].loc[buses]
Expand Down

0 comments on commit b3bfc0e

Please sign in to comment.