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

Backport PR #60321: TST (string dtype): resolve all xfails in IO pars… #60330

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

WillAyd
Copy link
Member

@WillAyd WillAyd commented Nov 15, 2024

Backport of #60321

@mroeschke mroeschke added Testing pandas testing functions or related to the test suite Strings String extension data type and string data labels Nov 15, 2024
@WillAyd
Copy link
Member Author

WillAyd commented Nov 15, 2024

Hmm not sure how to fix the failing test here. There's a lot of mutability going on in the CSV parser...but I can trace things back to base_parser.py:510 which calls:

index = ensure_index_from_sequences(arrays, names)

At that point in time, arrays has the right data with the proper dtype:

[array(['01'], dtype=object)]

but the Index constructor seems to force that to str, whereas the test expects object to be maintained.

@jorisvandenbossche any thoughts on this one?

@jorisvandenbossche
Copy link
Member

I have a local fix (have to include changes from #59316 I think), will clean up and push tomorrow

…andas-dev#59316)

* BUG: Avoid RangeIndex conversion in read_csv if dtype is specified

* Undo change

* Typing
@WillAyd
Copy link
Member Author

WillAyd commented Nov 17, 2024

@jorisvandenbossche with your added commit I think this is good to merge (?)

@jorisvandenbossche jorisvandenbossche merged commit 112c2e9 into pandas-dev:2.3.x Nov 18, 2024
61 of 62 checks passed
@jorisvandenbossche jorisvandenbossche added this to the 2.3 milestone Nov 18, 2024
@WillAyd WillAyd deleted the backport-60321 branch November 19, 2024 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Strings String extension data type and string data Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants