Skip to content

Commit

Permalink
using .loc instead of .copy
Browse files Browse the repository at this point in the history
  • Loading branch information
joda9 committed Aug 21, 2024
1 parent 962c9e3 commit 5e72bcc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions edisgo/io/ding0_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ def sort_hvmv_transformer_buses(transformers_df):
grid.import_from_csv_folder(path)

# write dataframes to edisgo_obj
edisgo_obj.topology.buses_df = grid.buses[
edisgo_obj.topology.buses_df.columns
].copy()
edisgo_obj.topology.lines_df = grid.lines[
edisgo_obj.topology.lines_df.columns
].copy()
edisgo_obj.topology.buses_df = grid.buses.loc[
:, edisgo_obj.topology.buses_df.columns
]
edisgo_obj.topology.lines_df = grid.lines.loc[
:, edisgo_obj.topology.lines_df.columns
]
if legacy_ding0_grids:
logger.debug("Use ding0 legacy grid import.")
# rename column peak_load to p_set
Expand Down

0 comments on commit 5e72bcc

Please sign in to comment.