diff --git a/cea/demand/demand_writers.py b/cea/demand/demand_writers.py index 858c62d871..9f6696526a 100644 --- a/cea/demand/demand_writers.py +++ b/cea/demand/demand_writers.py @@ -265,7 +265,7 @@ def write_to_hdf5(locator, list_buildings): if df is None: df = pd.read_hdf(temporary_file, key='dataset') else: - df = df.append(pd.read_hdf(temporary_file, key='dataset')) + df = pd.concat([df, pd.read_hdf(temporary_file, key='dataset')], ignore_index=True) df.to_hdf(locator.get_total_demand('hdf'), key='dataset') """read saved data of monthly values and return as totals""" diff --git a/cea/plugin.py b/cea/plugin.py index c74769acf6..f0bdeaca59 100644 --- a/cea/plugin.py +++ b/cea/plugin.py @@ -217,7 +217,9 @@ def calc_graph(self): raise AssertionError("cea.plots.PlotBase.calc_graph should not be part of the abstract interface") def calc_table(self): - raise DeprecationWarning("cea.plots.PlotBase.calc_table is not used anymore and will be removed in future") + import warnings + warnings.warn("cea.plots.PlotBase.calc_table is not used anymore and will be removed in future", + DeprecationWarning, stacklevel=2) @property def output_path(self): diff --git a/cea/technologies/thermal_network/thermal_network.py b/cea/technologies/thermal_network/thermal_network.py index c9e61196ae..55d048b64e 100644 --- a/cea/technologies/thermal_network/thermal_network.py +++ b/cea/technologies/thermal_network/thermal_network.py @@ -465,7 +465,8 @@ def thermal_network_main(locator, thermal_network, processes=1): # To do this, the initial dataset is repeated 4 times, the remaining values are filled with the average values of all above. edge_mass_flow_for_csv = pd.concat([edge_mass_flow_for_csv] * 4, ignore_index=True) while len(edge_mass_flow_for_csv.index) < HOURS_IN_YEAR: - edge_mass_flow_for_csv = edge_mass_flow_for_csv.append(edge_mass_flow_for_csv.mean(), ignore_index=True) + mean_row = edge_mass_flow_for_csv.mean().to_frame().T + edge_mass_flow_for_csv = pd.concat([edge_mass_flow_for_csv, mean_row], ignore_index=True) edge_mass_flow_for_csv.to_csv( thermal_network.locator.get_nominal_edge_mass_flow_csv_file(thermal_network.network_type, thermal_network.network_name), index=False) @@ -921,7 +922,8 @@ def extrapolate_datapoints_for_representative_weeks(representative_week_data): representative_week_df = pd.DataFrame(representative_week_data) representative_week_df = pd.concat([representative_week_df] * 4, ignore_index=True) while len(representative_week_df.index) < HOURS_IN_YEAR: - representative_week_df = representative_week_df.append(representative_week_df.mean(), ignore_index=True) + mean_row = representative_week_df.mean().to_frame().T + representative_week_df = pd.concat([representative_week_df, mean_row], ignore_index=True) return representative_week_df diff --git a/cea/utilities/create_mixed_use_type.py b/cea/utilities/create_mixed_use_type.py index 7ad709e258..0fb100ccd7 100644 --- a/cea/utilities/create_mixed_use_type.py +++ b/cea/utilities/create_mixed_use_type.py @@ -89,7 +89,7 @@ def calculate_mixed_loads(properties_df, loads_df, occupant_densities, list_uses calculated_loads_df['code'] = use_type_name # Remove rows that have the same `code` as new row clean_loads_df = loads_df[loads_df['code'] != use_type_name] - return clean_loads_df.append(calculated_loads_df) + return pd.concat([clean_loads_df, calculated_loads_df], ignore_index=True) def calculate_occupant_density(use_types, internal_loads_df):