Skip to content

Commit

Permalink
put str back
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-b-miller committed Dec 14, 2021
1 parent cd02d41 commit a9331d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/cudf/cudf/utils/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ def to_cudf_compatible_scalar(val, dtype=None):

if dtype is not None:
if isinstance(val, str) and np.dtype(dtype).kind == "M":
val = pd.Timestamp(val).to_datetime64().astype(dtype)
# pd.Timestamp can handle str, but not np.str_
val = pd.Timestamp(str(val)).to_datetime64().astype(dtype)
else:
val = val.astype(dtype)

Expand Down

0 comments on commit a9331d6

Please sign in to comment.