diff --git a/src/pyscal/gasoil.py b/src/pyscal/gasoil.py index 358c4a46..6993b8b9 100644 --- a/src/pyscal/gasoil.py +++ b/src/pyscal/gasoil.py @@ -293,8 +293,8 @@ def add_fromtable( ) # Do not extrapolate this data. We will bfill and ffill afterwards self.table["KRG"] = pchip(self.table["SG"], extrapolate=False) - self.table["KRG"] = self.table["KRG"].fillna(method="ffill") - self.table["KRG"] = self.table["KRG"].fillna(method="bfill") + self.table["KRG"] = self.table["KRG"].ffill() + self.table["KRG"] = self.table["KRG"].bfill() self.table["KRG"] = self.table["KRG"].clip(lower=0.0, upper=1.0) self.krgcomment = "-- krg from tabular input" + krgcomment + "\n" self.sgcr = self.estimate_sgcr() @@ -309,8 +309,8 @@ def add_fromtable( dframe[sgcolname].astype(float), dframe[krogcolname].astype(float) ) self.table["KROG"] = pchip(self.table["SG"], extrapolate=False) - self.table["KROG"] = self.table["KROG"].fillna(method="ffill") - self.table["KROG"] = self.table["KROG"].fillna(method="bfill") + self.table["KROG"] = self.table["KROG"].ffill() + self.table["KROG"] = self.table["KROG"].bfill() self.table["KROG"] = self.table["KROG"].clip(lower=0.0, upper=1.0) self.krogcomment = "-- krog from tabular input" + krogcomment + "\n" self.sorg = self.estimate_sorg() diff --git a/src/pyscal/wateroil.py b/src/pyscal/wateroil.py index 2033c99b..61c55385 100644 --- a/src/pyscal/wateroil.py +++ b/src/pyscal/wateroil.py @@ -917,7 +917,7 @@ def add_skjaeveland_pc( # From 1-sor, the pc is not defined. Extrapolate constantly, and let # the non-monotonicity be fixed in the output generators. - self.table["PC"] = self.table["PC"].fillna(method="ffill") + self.table["PC"] = self.table["PC"].ffill() def add_LET_pc_pd( self, diff --git a/src/pyscal/wateroilgas.py b/src/pyscal/wateroilgas.py index f5203671..4a0cb763 100644 --- a/src/pyscal/wateroilgas.py +++ b/src/pyscal/wateroilgas.py @@ -160,8 +160,8 @@ def SOF3(self, header: bool = True, dataincommentrow: bool = True) -> str: .set_index("SO") .sort_index() .interpolate(method="slinear") - .fillna(method="ffill") - .fillna(method="bfill") + .ffill() + .bfill() .reset_index() ) sof3table["soint"] = list(map(round, sof3table["SO"] * SWINTEGERS))