NVIDIA / NVIDIA/cudf

[FEA] Disallow sets from data/index/column constructors?

Open
#14,129 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.**
pandas has disallowed sets from data/index/column constructors since they are unordered and construction assumes order of elements. Should cudf do the same?

```python
In [1]: import cudf

In [3]: cudf.Series({1, 2, 3})
Out[3]:
0 1
1 2
2 3
dtype: int64

In [4]: cudf.Series({"a": {1, 2, 3}})
Out[4]:
a [1, 2, 3]
dtype: list

In [5]: cudf.DataFrame({"a": {1, 2, 3}})
Out[5]:
a
0 1
1 2
2 3

In [6]: cudf.DataFrame(range(2), index={1, 2})
Out[6]:
0
1 0
2 1

In [8]: cudf.DataFrame(range(2), columns={1})
Out[8]:
1
0 0
1 1
```

**Describe the solution you'd like**
All the examples raise a ValueError

**Describe alternatives you've considered**
Convert to list

**Additional context**
Add any other context, code examples, or references to existing implementations about the feature request 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.