From a4300a7114de217780d4b25f98e89be3f58bd788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20C=2E=20Riven=C3=A6s?= Date: Thu, 28 Sep 2023 16:54:50 +0200 Subject: [PATCH] WIP --- src/xtgeo/well/_welldata.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/xtgeo/well/_welldata.py b/src/xtgeo/well/_welldata.py index 2aa41aaa2..634fa9207 100644 --- a/src/xtgeo/well/_welldata.py +++ b/src/xtgeo/well/_welldata.py @@ -272,3 +272,21 @@ def get_dataframe_copy(self, infer_dtype: bool = False): else: return self.data.copy() + + def get_dataframe(self): + """Get the dataframe, . + + If infer_dtype is True, then DISC columns will be of "int32" type + """ + + if infer_dtype: + dfr = self.data.copy() + + for name, wtype in self.wlogtypes.items(): + if "DISC" in wtype: + dfr[name] = dfr[name].astype("int32") + + return dfr + + else: + return self.data.copy()