From fe69e7fbf24617a21a5e26d95ca9db9f95ca9f2e Mon Sep 17 00:00:00 2001 From: Ralph Liu <137829296+nv-rliu@users.noreply.github.com> Date: Tue, 13 Feb 2024 11:24:55 -0500 Subject: [PATCH] Fix `FutureWarnings` in Graph Creation (#4167) Addresses #4163 This PR uses `iloc` when referencing the index in a Series object, which removes the `FutureWarning` that was seen at graph creation. Authors: - Ralph Liu (https://github.com/nv-rliu) Approvers: - Rick Ratzel (https://github.com/rlratzel) URL: https://github.com/rapidsai/cugraph/pull/4167 --- python/cugraph/cugraph/structure/number_map.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cugraph/cugraph/structure/number_map.py b/python/cugraph/cugraph/structure/number_map.py index d7da20f9d84..b0118fee960 100644 --- a/python/cugraph/cugraph/structure/number_map.py +++ b/python/cugraph/cugraph/structure/number_map.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-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. @@ -497,7 +497,7 @@ def renumber_and_segment( # can't determine the edgelist input type unrenumbered_id_type = None else: - unrenumbered_id_type = df.dtypes[0] + unrenumbered_id_type = df.dtypes.iloc[0] if np.int64 in list(df.dtypes): renumber_id_type = np.int64