File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,18 @@ def read(self) -> DataFrame:
274
274
275
275
dtype_backend = self .kwds ["dtype_backend" ]
276
276
277
+ # Handle missing date values by checking for timestamp columns
278
+ for i , field in enumerate (table .schema ):
279
+ if pa .types .is_timestamp (field .type ): # Check if the column is a timestamp
280
+ # Convert to a Pandas Series
281
+ column = table .column (i ).to_pandas ()
282
+
283
+ # Replace missing values with NaT
284
+ column .fillna (pd .NaT , inplace = True )
285
+
286
+ # Update the column back to the table
287
+ table = table .set_column (i , field .name , pa .array (column ))
288
+
277
289
# Convert all pa.null() cols -> float64 (non nullable)
278
290
# else Int64 (nullable case, see below)
279
291
if dtype_backend is lib .no_default :
You can’t perform that action at this time.
0 commit comments