Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace legacy cudf and dask_cudf imports as (d)gd #14944

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions python/cudf/cudf/api/extensions/accessor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020-2022, NVIDIA CORPORATION.
# Copyright (c) 2020-2024, NVIDIA CORPORATION.

import warnings

Expand Down Expand Up @@ -37,8 +37,8 @@
_dataframe_example = """
In your library code:
>>> import cudf as gd
>>> @gd.api.extensions.register_dataframe_accessor("point")
>>> import cudf
>>> @cudf.api.extensions.register_dataframe_accessor("point")
... class PointsAccessor:
... def __init__(self, obj):
... self._validate(obj)
Expand All @@ -57,7 +57,7 @@
Then in user code:
>>> df = gd.DataFrame({'x': [1,2,3,4,5,6], 'y':[7,6,5,4,3,2]})
>>> df = cudf.DataFrame({'x': [1,2,3,4,5,6], 'y':[7,6,5,4,3,2]})
>>> df.point.bounding_box
(1, 2, 6, 7)
Expand All @@ -66,8 +66,8 @@
_index_example = """
In your library code:
>>> import cudf as gd
>>> @gd.api.extensions.register_index_accessor("odd")
>>> import cudf
>>> @cudf.api.extensions.register_index_accessor("odd")
... class OddRowAccessor:
... def __init__(self, obj):
... self._obj = obj
Expand All @@ -76,7 +76,7 @@
Then in user code:
>>> gs = gd.Index(list(range(0, 50)))
>>> gs = cudf.Index(list(range(0, 50)))
>>> gs.odd[1]
1
>>> gs.odd[2]
Expand All @@ -89,8 +89,8 @@
_series_example = """
In your library code:
>>> import cudf as gd
>>> @gd.api.extensions.register_series_accessor("odd")
>>> import cudf
>>> @cudf.api.extensions.register_series_accessor("odd")
... class OddRowAccessor:
... def __init__(self, obj):
... self._obj = obj
Expand All @@ -99,7 +99,7 @@
Then in user code:
>>> gs = gd.Series(list(range(0, 50)))
>>> gs = cudf.Series(list(range(0, 50)))
>>> gs.odd[1]
1
>>> gs.odd[2]
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/indexed_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4442,7 +4442,7 @@ def sample(
Examples
--------
>>> import cudf as cudf
>>> import cudf
>>> df = cudf.DataFrame({"a":{1, 2, 3, 4, 5}})
>>> df.sample(3)
a
Expand Down
10 changes: 5 additions & 5 deletions python/cudf/cudf/datasets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020-2022, NVIDIA CORPORATION.
# Copyright (c) 2020-2024, NVIDIA CORPORATION.

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -42,8 +42,8 @@ def timeseries(
Examples
--------
>>> import cudf as gd
>>> gdf = gd.datasets.timeseries()
>>> import cudf
>>> gdf = cudf.datasets.timeseries()
>>> gdf.head() # doctest: +SKIP
timestamp id name x y
2000-01-01 00:00:00 967 Jerry -0.031348 -0.040633
Expand Down Expand Up @@ -97,8 +97,8 @@ def randomdata(nrows=10, dtypes=None, seed=None):
Examples
--------
>>> import cudf as gd
>>> gdf = gd.datasets.randomdata()
>>> import cudf
>>> gdf = cudf.datasets.randomdata()
>>> cdf.head() # doctest: +SKIP
id x y
0 1014 0.28361267466770146 -0.44274170661264334
Expand Down
Loading
Loading