diff --git a/python/cudf/cudf/_lib/CMakeLists.txt b/python/cudf/cudf/_lib/CMakeLists.txt index 1c2b24d2391..391c0eac858 100644 --- a/python/cudf/cudf/_lib/CMakeLists.txt +++ b/python/cudf/cudf/_lib/CMakeLists.txt @@ -41,7 +41,6 @@ set(cython_sources string_casting.pyx strings_udf.pyx text.pyx - timezone.pyx transform.pyx types.pyx utils.pyx diff --git a/python/cudf/cudf/_lib/__init__.py b/python/cudf/cudf/_lib/__init__.py index 13d05033c11..8ce6d5bf5c9 100644 --- a/python/cudf/cudf/_lib/__init__.py +++ b/python/cudf/cudf/_lib/__init__.py @@ -28,7 +28,6 @@ strings, strings_udf, text, - timezone, ) MAX_COLUMN_SIZE = np.iinfo(np.int32).max diff --git a/python/cudf/cudf/_lib/timezone.pyx b/python/cudf/cudf/_lib/timezone.pyx deleted file mode 100644 index 54624a5a2fd..00000000000 --- a/python/cudf/cudf/_lib/timezone.pyx +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2023-2024, NVIDIA CORPORATION. - -import pylibcudf as plc - -from cudf._lib.column cimport Column - - -def make_timezone_transition_table(tzdir, tzname): - plc_table = plc.io.timezone.make_timezone_transition_table(tzdir, tzname) - return [Column.from_pylibcudf(col) for col in plc_table.columns()] diff --git a/python/cudf/cudf/core/_internals/timezones.py b/python/cudf/cudf/core/_internals/timezones.py index fd89904e766..4d001577581 100644 --- a/python/cudf/cudf/core/_internals/timezones.py +++ b/python/cudf/cudf/core/_internals/timezones.py @@ -10,8 +10,10 @@ import numpy as np import pandas as pd +import pylibcudf as plc + import cudf -from cudf._lib.timezone import make_timezone_transition_table +from cudf._lib.column import Column if TYPE_CHECKING: from cudf.core.column.datetime import DatetimeColumn @@ -109,11 +111,14 @@ def _find_and_read_tzfile_tzdata( def _read_tzfile_as_columns( - tzdir, zone_name: str + tzdir: str, zone_name: str ) -> tuple[DatetimeColumn, TimeDeltaColumn]: - transition_times_and_offsets = make_timezone_transition_table( + plc_table = plc.io.timezone.make_timezone_transition_table( tzdir, zone_name ) + transition_times_and_offsets = [ + Column.from_pylibcudf(col) for col in plc_table.columns() + ] if not transition_times_and_offsets: from cudf.core.column.column import as_column