diff --git a/python/cugraph/cugraph/structure/graph_classes.py b/python/cugraph/cugraph/structure/graph_classes.py index 03efcba0307..f48895c90b9 100644 --- a/python/cugraph/cugraph/structure/graph_classes.py +++ b/python/cugraph/cugraph/structure/graph_classes.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2023, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -426,7 +426,7 @@ def from_pandas_edgelist( ... edge_attr='2', renumber=False) """ - if not isinstance(pdf, pd.core.frame.DataFrame): + if not isinstance(pdf, pd.DataFrame): raise TypeError("pdf input is not a Pandas DataFrame") gdf = cudf.DataFrame.from_pandas(pdf) @@ -450,7 +450,7 @@ def from_pandas_adjacency(self, pdf): pdf : pandas.DataFrame A DataFrame that contains adjacency information """ - if not isinstance(pdf, pd.core.frame.DataFrame): + if not isinstance(pdf, pd.DataFrame): raise TypeError("pdf input is not a Pandas DataFrame") np_array = pdf.to_numpy() diff --git a/python/cugraph/cugraph/structure/hypergraph.py b/python/cugraph/cugraph/structure/hypergraph.py index 4add74d6061..add68cb6dac 100644 --- a/python/cugraph/cugraph/structure/hypergraph.py +++ b/python/cugraph/cugraph/structure/hypergraph.py @@ -185,7 +185,7 @@ def hypergraph( events.reset_index(drop=True, inplace=True) if EVENTID not in events.columns: - events[EVENTID] = cudf.core.index.RangeIndex(len(events)) + events[EVENTID] = cudf.RangeIndex(len(events)) events[EVENTID] = _prepend_str(events[EVENTID], EVENTID + DELIM) events[NODETYPE] = ( @@ -596,6 +596,4 @@ def _prepend_str(col, val): # Make an empty categorical string dtype def _empty_cat_dt(): - return cudf.core.dtypes.CategoricalDtype( - categories=np.array([], dtype="str"), ordered=False - ) + return cudf.CategoricalDtype(categories=np.array([], dtype="str"), ordered=False) diff --git a/python/cugraph/cugraph/tests/utils/test_dataset.py b/python/cugraph/cugraph/tests/utils/test_dataset.py index 39f7ed8850b..9331cefcfda 100644 --- a/python/cugraph/cugraph/tests/utils/test_dataset.py +++ b/python/cugraph/cugraph/tests/utils/test_dataset.py @@ -171,14 +171,14 @@ def test_reader(dataset): E = dataset.get_edgelist(download=True) assert E is not None - assert isinstance(E, cudf.core.dataframe.DataFrame) + assert isinstance(E, cudf.DataFrame) dataset.unload() # using pandas E_pd = dataset.get_edgelist(download=True, reader="pandas") assert E_pd is not None - assert isinstance(E_pd, pandas.core.frame.DataFrame) + assert isinstance(E_pd, pandas.DataFrame) dataset.unload() with pytest.raises(ValueError):