From 1d696465174c5431cd1fc37e59b96df9b5ab4fd7 Mon Sep 17 00:00:00 2001 From: pandyah5 Date: Tue, 11 Jun 2024 22:34:03 -0700 Subject: [PATCH] Changed None types to NaN --- pandas/core/series.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandas/core/series.py b/pandas/core/series.py index 3d1bd8ebb03cb..b700677747e44 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -3141,6 +3141,10 @@ def combine_first(self, other) -> Series: """ from pandas.core.reshape.concat import concat + # Change None values to NaN + self.fillna(value=np.nan, inplace=True) + other.fillna(value=np.nan, inplace=True) + if self.dtype == other.dtype: if self.index.equals(other.index): return self.mask(self.isna(), other)