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

[BUG] DataFrame of Series objects unnecessarily sorts resulting column #14132

Closed
mroeschke opened this issue Sep 19, 2023 · 0 comments · Fixed by #14136
Closed

[BUG] DataFrame of Series objects unnecessarily sorts resulting column #14132

mroeschke opened this issue Sep 19, 2023 · 0 comments · Fixed by #14136
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@mroeschke
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

Steps/Code to reproduce bug

In [27]: from cudf import *

In [28]:         series = [Series(i, index=["b", "a", "c"], name=str(i)) for i in range(3)]
    ...:         result = DataFrame(series)

In [29]: series
Out[29]: 
[b    0
 a    0
 c    0
 Name: 0, dtype: int64,
 b    1
 a    1
 c    1
 Name: 1, dtype: int64,
 b    2
 a    2
 c    2
 Name: 2, dtype: int64]

In [30]: result
Out[30]: 
   a  b  c
0  0  0  0
1  1  1  1
2  2  2  2

Expected behavior

In [30]: result
Out[30]: 
   b  a  c
0  0  0  0
1  1  1  1
2  2  2  2

Environment overview (please complete the following information)

  • Environment location: Docker
  • Method of cuDF install: conda
@mroeschke mroeschke added bug Something isn't working Python Affects Python cuDF API. labels Sep 19, 2023
rapids-bot bot pushed a commit that referenced this issue Sep 20, 2023
closes #14132

This PR removes the re-sorting of dataframe columns when initialized by a series list.

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

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)
  - Bradley Dice (https://github.com/bdice)

URL: #14136
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant