Skip to content

Commit

Permalink
Address cudf.DataFrame.insert API change (#1428)
Browse files Browse the repository at this point in the history
closes #1427

The API of `cudf.DataFrame.insert` will change in 24.10 to better align with pandas, so adjusting the usage here

xref rapidsai/cudf#16402

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)

Approvers:
  - Mark Harris (https://github.com/harrism)

URL: #1428
  • Loading branch information
mroeschke authored Aug 7, 2024
1 parent 8ffb204 commit 3906fb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/cuspatial/cuspatial/core/geodataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def reset_index(
if not drop:
if not isinstance(cudf_data.index, cudf.MultiIndex):
recombiner.insert(
loc=0, name="index", value=cudf_reindexed["index"]
loc=0, column="index", value=cudf_reindexed["index"]
)
# If the index is a MultiIndex, we need to insert the
# individual levels into the GeoDataFrame.
Expand All @@ -288,7 +288,7 @@ def reset_index(
for n, name in enumerate(levels):
recombiner.insert(
loc=n,
name=name,
column=name,
value=cudf_reindexed[name].reset_index(drop=True),
)
recombiner.index = cudf_reindexed.index
Expand Down

0 comments on commit 3906fb9

Please sign in to comment.