From bde0e6644485ccae2226bce74fe8ff65c04cbe8a Mon Sep 17 00:00:00 2001
From: Colm Talbot <colm.talbot@ligo.org>
Date: Thu, 19 May 2022 15:19:37 +0000
Subject: [PATCH] Avoid pandas deprecation warning

---
 bilby/core/result.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/bilby/core/result.py b/bilby/core/result.py
index 700c6469a..45ffebba5 100644
--- a/bilby/core/result.py
+++ b/bilby/core/result.py
@@ -1998,11 +1998,13 @@ def make_pp_plot(results, filename=None, save=True, confidence_interval=[0.68, 0
     if weight_list is None:
         weight_list = [None] * len(results)
 
-    credible_levels = pd.DataFrame()
+    credible_levels = list()
     for i, result in enumerate(results):
-        credible_levels = credible_levels.append(
+        credible_levels.append(
             result.get_all_injection_credible_levels(keys, weights=weight_list[i]),
-            ignore_index=True)
+            ignore_index=True,
+        )
+    credible_levels = pd.DataFrame(credible_levels)
 
     if lines is None:
         colors = ["C{}".format(i) for i in range(8)]
-- 
GitLab