NVIDIA / NVIDIA/cudf

[BUG] Index accessors wrongly in `dir` for Index subclasses in `cudf.pandas`

Open
#14,419 2 comments 0 reactions 0 assignees View on GitHub
bug cudf.pandas Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Describe the bug**
Index accessors wrongly in `dir` for Index subclasses in `cudf.pandas`.

I think this is because the proxy Index subclasses objects have `bases=(Index,)` which has the accessors as additional attributes.

**Steps/Code to reproduce bug**
```python
In [1]: %load_ext cudf.pandas

In [2]: import pandas as pd

In [3]: "str" in dir(pd.RangeIndex(2))
Out[3]: True
```
**Expected behavior**
```python
In [1]: import pandas as pd

In [2]: "str" in dir(pd.RangeIndex(2))
Out[2]: False
```

**Environment overview (please complete the following information)**
- Environment location: Bare-metal
- Method of cuDF install: from source

**Environment details**
Please run and paste the output of the `cudf/print_env.sh` script here, to gather any other relevant environment details

**Additional context**
Add any other context about the problem here.

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.