NVIDIA / NVIDIA/cudf

[BUG] support index functions in cudf.DataFrame.rename

Open
#12,413 0 comments 0 reactions 0 assignees View on GitHub
feature request Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Is your feature request related to a problem? Please describe.**
rewriting code with `import cudf as pd`

**Describe the solution you'd like**
```
>>> import cudf as pd
>>> pd.__version__
'22.12.01'
>>> df = pd.DataFrame({'a': range(10)})
>>> df = df.rename(index=str, columns={'a': 'b'})
Traceback (most recent call last):
File "", line 1, in
File ".../python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File ".../python3.8/site-packages/cudf/core/dataframe.py", line 3365, in rename
any(type(item) == str for item in index.values())
AttributeError: type object 'str' has no attribute 'values'
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.