Skip to content

Commit

Permalink
Fix bug of e2nIEE#510 pp.to_excel fuction
Browse files Browse the repository at this point in the history
  • Loading branch information
Gseguelg committed Oct 3, 2019
1 parent ce51946 commit 6ec182d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pandapower/io_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def to_dict_of_dfs(net, include_results=False, fallback_to_pickle=True, include_
continue
elif item == "std_types":
for t in net.std_types.keys(): # which are ["line", "trafo", "trafo3w"]
dodfs["%s_std_types" % t] = pd.DataFrame(net.std_types[t]).T
if net.std_types[t]: # avoid empty excel sheets for std_types if empty
dodfs["%s_std_types" % t] = pd.DataFrame(net.std_types[t]).T
continue
elif item == "user_pf_options":
if len(value) > 0:
Expand All @@ -95,7 +96,7 @@ def to_dict_of_dfs(net, include_results=False, fallback_to_pickle=True, include_
continue

# value is pandas DataFrame
if include_empty_tables and value.empty:
if not include_empty_tables and value.empty:
continue

if item == "bus_geodata":
Expand Down

0 comments on commit 6ec182d

Please sign in to comment.