From 962c9e387d9bec405b99264602fcaa4d93f57c32 Mon Sep 17 00:00:00 2001 From: joda9 Date: Wed, 21 Aug 2024 10:27:15 +0200 Subject: [PATCH] fixing pandas warning --- edisgo/io/ding0_import.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/edisgo/io/ding0_import.py b/edisgo/io/ding0_import.py index 326553111..7e9a5e7df 100644 --- a/edisgo/io/ding0_import.py +++ b/edisgo/io/ding0_import.py @@ -72,8 +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] - edisgo_obj.topology.lines_df = grid.lines[edisgo_obj.topology.lines_df.columns] + 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() if legacy_ding0_grids: logger.debug("Use ding0 legacy grid import.") # rename column peak_load to p_set