From dd37619feada3a9f3864a922beb699c8494ada5e Mon Sep 17 00:00:00 2001 From: Jesper Sandvig Mariegaard <34088801+jsmariegaard@users.noreply.github.com> Date: Mon, 20 Nov 2023 00:21:19 +0100 Subject: [PATCH] Make it more clear that value is a dataframe --- modelskill/comparison/_comparison.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modelskill/comparison/_comparison.py b/modelskill/comparison/_comparison.py index 9c9632ff9..3081cb011 100644 --- a/modelskill/comparison/_comparison.py +++ b/modelskill/comparison/_comparison.py @@ -671,11 +671,11 @@ def save(self, filename: Union[str, Path]) -> None: if self.gtype == "point": ds = self.data.copy() # copy needed to avoid modifying self.data - for key, value in self.raw_mod_data.items(): - value = value.copy() + for key, df in self.raw_mod_data.items(): + df = df.copy() # rename time to unique name - value.index.name = "_time_raw_" + key - da = value.to_xarray()[key] + df.index.name = "_time_raw_" + key + da = df.to_xarray()[key] ds["_raw_" + key] = da ds.to_netcdf(filename)