From 190b263a35614d7446bbcecd8712169badb3f26c Mon Sep 17 00:00:00 2001 From: zqfang Date: Wed, 30 Oct 2024 20:25:25 -0700 Subject: [PATCH] fix method keyword deprecation warning, #283 --- gseapy/plot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gseapy/plot.py b/gseapy/plot.py index 99a7cda..a35ecd6 100644 --- a/gseapy/plot.py +++ b/gseapy/plot.py @@ -691,9 +691,8 @@ def process(self, df: pd.DataFrame): f"Can not detetermine colormap. All values in {self.colname} are 0s" ) df = df.sort_values(by=self.colname) - df[self.colname].replace( - 0, method="bfill", inplace=True - ) ## asending order, use bfill + ## asending order, use bfill + df[self.colname] = df[self.colname].replace(0, np.nan).bfill() df = df.assign(p_inv=np.log10(1 / df[self.colname].astype(float))) _t = colnd[self.colname] self.colname = "p_inv"