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 and Series construction does not complain on mismatching index length #12999

Closed
wence- opened this issue Mar 23, 2023 · 0 comments · Fixed by #13122
Closed

[BUG] DataFrame and Series construction does not complain on mismatching index length #12999

wence- opened this issue Mar 23, 2023 · 0 comments · Fixed by #13122
Assignees
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@wence-
Copy link
Contributor

wence- commented Mar 23, 2023

Describe the bug

import cudf
y = cudf.Series([1, 2, 3], index=[1, 2])

This completes fine, and many operations on the series "succeed". It is only if doing things like printing that we get an error.

Expected behavior

This should produce a ValueError on construction, like pandas:

import pandas as pd
y = pd.Series([1, 2, 3], index=[1, 2])
# => ValueError
@wence- wence- added bug Something isn't working Needs Triage Need team to review and classify labels Mar 23, 2023
@wence- wence- self-assigned this Mar 23, 2023
rapids-bot bot pushed a commit that referenced this issue Apr 14, 2023
…13122)

Fixes: #12999, #13056

This PR fixes the `Series` and `DataFrame` constructors to validate the `data` & `index` lengths. This also contains fixes where `index` was being ignored in certain cases.

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #13122
@galipremsagar galipremsagar added Python Affects Python cuDF API. and removed Needs Triage Need team to review and classify labels Apr 14, 2023
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.

2 participants