Skip to content

BUG: Fix read_csv index dtype override #59219

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

Closed
wants to merge 7 commits into from
Closed

Conversation

xouyang1
Copy link

@xouyang1 xouyang1 commented Jul 9, 2024

@xouyang1 xouyang1 changed the title BUG: Fix index dtype override for default c engine BUG: Fix read_csv index dtype override Jul 10, 2024
@xouyang1 xouyang1 marked this pull request as ready for review July 10, 2024 12:19
@MarcoGorelli
Copy link
Member

hey, thanks for the ping and the PR - I'm not really familiar with this part of the codebase. I can take a look but I'm afraid there are other priorities at the moment

if isinstance(data, np.ndarray) and isinstance(conv_data, range)
else None
)
return Index(conv_data, dtype=dtype, name=names)
Copy link
Author

Choose a reason for hiding this comment

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

#59077 (comment)
I think this is the best place to add in the explicit dtype after the possible conversion to python native range type.

@xouyang1
Copy link
Author

@mroeschke Hi Matthew, can you help take a look at my pr for this?

@mroeschke
Copy link
Member

Sorry I just merged #59316 which overlaps with your fix here. Thanks for the contribution but going to close now that the issue is fixed

@mroeschke mroeschke closed this Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: index_col in read_csv ignores dtype argument
3 participants