Skip to content

Commit 4d40893

Browse files
committed
added fillna for null timestamp values
1 parent c555207 commit 4d40893

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/pyspark/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def _create_batch(series):
227227
def cast_series(s, t):
228228
if type(t) == pa.TimestampType:
229229
# NOTE: convert to 'us' with astype here, unit ignored in `from_pandas` see ARROW-1680
230-
return _check_series_convert_timestamps_internal(s)\
230+
return _check_series_convert_timestamps_internal(s.fillna(0))\
231231
.values.astype('datetime64[us]', copy=False)
232232
elif t == pa.date32():
233233
# TODO: this converts the series to Python objects, possibly avoid with Arrow >= 0.8

0 commit comments

Comments
 (0)