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

Fix DataFrame.values with no columns but index #14134

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

mroeschke
Copy link
Contributor

Description

Fixes the following

In [32]: cudf.DataFrame(index=range(10)).values
Out[32]: array([], shape=(0, 0), dtype=float64)

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@mroeschke mroeschke added bug Something isn't working Python Affects Python cuDF API. non-breaking Non-breaking change labels Sep 19, 2023
@mroeschke mroeschke requested a review from a team as a code owner September 19, 2023 23:51

def test_data_frame_values_no_cols_but_index():
result = cudf.DataFrame(index=range(5)).values
expected = cupy.empty((5, 0), dtype=np.dtype("float64"), order="F")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we change this test to compare against pandas?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure changed to compare against pandas

@galipremsagar galipremsagar added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Sep 20, 2023
@galipremsagar
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit 7b0693f into rapidsai:branch-23.10 Sep 20, 2023
54 checks passed
@mroeschke mroeschke deleted the bug/values/empty branch September 20, 2023 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants