Skip to content

Commit

Permalink
Style and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Sep 13, 2023
1 parent 325ff66 commit 9123584
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions python/cudf/cudf/core/column/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -2539,14 +2539,14 @@ def _construct_array(
# We may have date-like strings with timezones
try:
pd_arbitrary = pd.to_datetime(arbitrary)
except pd.errors.OutOfBoundsDatetime:
# https://github.com/pandas-dev/pandas/issues/55096
pass
else:
if isinstance(pd_arbitrary.dtype, pd.DatetimeTZDtype):
raise NotImplementedError(
"cuDF does not yet support timezone-aware datetimes"
)
except pd.errors.OutOfBoundsDatetime:
# https://github.com/pandas-dev/pandas/issues/55096
pass

arbitrary = np.asarray(
arbitrary,
dtype=native_dtype
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/tests/test_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -2151,7 +2151,7 @@ def test_daterange_pandas_compatibility():


def test_strings_with_utc_offset_not_implemented():
with pytest.warns(DeprecationWarning, match="parsing timezone"):
with pytest.warns(DeprecationWarning, match="parsing timezone"): # cupy
with pytest.raises(NotImplementedError):
DatetimeIndex(["2022-07-22 00:00:00+02:00"])

Expand Down

0 comments on commit 9123584

Please sign in to comment.