diff --git a/assume/common/outputs.py b/assume/common/outputs.py index dd92b6e3f..0ffceaec0 100644 --- a/assume/common/outputs.py +++ b/assume/common/outputs.py @@ -204,7 +204,6 @@ async def store_dfs(self): continue # exclude all empty dataframes from self.write_dfs[table] - self.write_dfs[table] = [df for df in self.write_dfs[table] if not df.empty] df = pd.concat(self.write_dfs[table], axis=0) df.reset_index() @@ -322,7 +321,8 @@ def write_market_dispatch(self, data): """ df = pd.DataFrame(data, columns=["datetime", "power", "market_id", "unit_id"]) df["simulation"] = self.simulation_id - self.write_dfs["market_dispatch"].append(df) + if not df.empty: + self.write_dfs["market_dispatch"].append(df) def write_unit_dispatch(self, data): """