diff --git a/pandas/core/series.py b/pandas/core/series.py index fe2bb0b5aa5c3..c66679dec76d1 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -3223,6 +3223,13 @@ def combine_first(self, other) -> Series: """ from pandas.core.reshape.concat import concat + def replace_none_with_nan(series): + series.fillna(value=np.nan, inplace=True) + + """Apply the function to both Series""" + replace_none_with_nan(self) + replace_none_with_nan(other) + if self.dtype == other.dtype: if self.index.equals(other.index): return self.mask(self.isna(), other) diff --git a/pandas/io/parsers/arrow_parser_wrapper.py b/pandas/io/parsers/arrow_parser_wrapper.py index 86bb5f190e403..b0dca668b8dcf 100644 --- a/pandas/io/parsers/arrow_parser_wrapper.py +++ b/pandas/io/parsers/arrow_parser_wrapper.py @@ -274,6 +274,14 @@ def read(self) -> DataFrame: dtype_backend = self.kwds["dtype_backend"] + # Handle missing date values by checking for timestamp columns + for i, field in enumerate(table.schema): + if pa.types.is_timestamp(field.type): + column = table.column(i).to_pandas() + column.fillna(pd.NaT, inplace=True) + + table = table.set_column(i, field.name, pa.array(column)) + # Convert all pa.null() cols -> float64 (non nullable) # else Int64 (nullable case, see below) if dtype_backend is lib.no_default: