diff --git a/python/cudf/cudf/pandas/_wrappers/pandas.py b/python/cudf/cudf/pandas/_wrappers/pandas.py index c50e72b4b12..5ea2af7d002 100644 --- a/python/cudf/cudf/pandas/_wrappers/pandas.py +++ b/python/cudf/cudf/pandas/_wrappers/pandas.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +# SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. # All rights reserved. # SPDX-License-Identifier: Apache-2.0 import copyreg @@ -1036,6 +1036,15 @@ def _df_query_method(self, *args, local_dict=None, global_dict=None, **kwargs): additional_attributes={"__hash__": _FastSlowAttribute("__hash__")}, ) +BaseOffset = make_final_proxy_type( + "BaseOffset", + _Unusable, + pd.offsets.BaseOffset, + fast_to_slow=_Unusable(), + slow_to_fast=_Unusable(), + additional_attributes={"__hash__": _FastSlowAttribute("__hash__")}, +) + Day = make_final_proxy_type( "Day", _Unusable, diff --git a/python/cudf/cudf_pandas_tests/test_cudf_pandas.py b/python/cudf/cudf_pandas_tests/test_cudf_pandas.py index bd8ca9f1640..44f301819ed 100644 --- a/python/cudf/cudf_pandas_tests/test_cudf_pandas.py +++ b/python/cudf/cudf_pandas_tests/test_cudf_pandas.py @@ -1233,3 +1233,8 @@ def test_concat_fast(): def test_func_namespace(): # note: this test is sensitive to Pandas' internal module layout assert xpd.concat is xpd.core.reshape.concat.concat + + +def test_isinstance_base_offset(): + offset = xpd.tseries.frequencies.to_offset("1s") + assert isinstance(offset, xpd.tseries.offsets.BaseOffset)