Skip to content

Commit

Permalink
Remove comments as it matches pandas behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Feb 28, 2025
1 parent 85c6bff commit 9962d04
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions python/cudf/cudf/core/column/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,8 @@ def _validate_fillna_value(
isinstance(fill_value, np.datetime64)
and self.time_unit != np.datetime_data(fill_value)[0]
):
# TODO: Disallow this cast
fill_value = fill_value.astype(self.dtype)
elif isinstance(fill_value, str) and fill_value.lower() == "nat":
# TODO: Disallow this casting; user should be explicit
fill_value = np.datetime64(fill_value, self.time_unit)
return super()._validate_fillna_value(fill_value)

Expand Down
2 changes: 0 additions & 2 deletions python/cudf/cudf/core/column/timedelta.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,8 @@ def _validate_fillna_value(
isinstance(fill_value, np.timedelta64)
and self.time_unit != np.datetime_data(fill_value)[0]
):
# TODO: Disallow this cast
fill_value = fill_value.astype(self.dtype)
elif isinstance(fill_value, str) and fill_value.lower() == "nat":
# TODO: Disallow this casting; user should be explicit
fill_value = np.timedelta64(fill_value, self.time_unit)
return super()._validate_fillna_value(fill_value)

Expand Down

0 comments on commit 9962d04

Please sign in to comment.