From 4966695bbcd69bbbf46a2d46cced6a29f2642217 Mon Sep 17 00:00:00 2001
From: leufen1 <l.leufen@fz-juelich.de>
Date: Fri, 19 Feb 2021 07:56:28 +0100
Subject: [PATCH] stated dtypes explicitely in comp skill score plot (some new
 package caused errors)

---
 mlair/plotting/postprocessing_plotting.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mlair/plotting/postprocessing_plotting.py b/mlair/plotting/postprocessing_plotting.py
index 7fe6bc2f..1cb6181a 100644
--- a/mlair/plotting/postprocessing_plotting.py
+++ b/mlair/plotting/postprocessing_plotting.py
@@ -734,7 +734,8 @@ class PlotCompetitiveSkillScore(AbstractPlotClass):
         data = data.to_dataframe("data").unstack(level=1).swaplevel()
         data.columns = data.columns.levels[1]
         self._labels = [str(i) + "d" for i in data.index.levels[1].values]
-        return data.stack(level=0).reset_index(level=2, drop=True).reset_index(name="data")
+        data = data.stack(level=0).reset_index(level=2, drop=True).reset_index(name="data")
+        return data.astype({"comparison": str, "ahead": int, "data": float})
 
     def _plot(self, single_model_comparison=False):
         """Plot skill scores of the comparisons."""
-- 
GitLab