Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mroeschke opened this issue Sep 19, 2023 · 0 comments
Open

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

mroeschke opened this issue Sep 19, 2023 · 0 comments
Labels
feature request New feature or request Python Affects Python cuDF API.

Comments

@mroeschke
Copy link
Contributor

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?

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.

@mroeschke mroeschke added feature request New feature or request Python Affects Python cuDF API. labels Sep 19, 2023
@vyasr vyasr added this to cuDF Python Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request Python Affects Python cuDF API.
Projects
Status: Todo
Development

No branches or pull requests

1 participant