Skip to content

Conversation

Alvaro-Kothe
Copy link
Contributor

@Alvaro-Kothe Alvaro-Kothe commented Oct 4, 2025


Reading big integers as strings was tested behavior. I am not sure if this change is desired.

Implementation details

When an overflow occurs during integer parsing, instead of reading the data as a string, now reads it as PyLongObject.

@Alvaro-Kothe Alvaro-Kothe marked this pull request as ready for review October 4, 2025 22:10
@Alvaro-Kothe Alvaro-Kothe changed the title BUG: make read_csv read large integers (>64bits) as objects with C engine BUG: make read_csv read large integers (>64bits) as python strings with C engine Oct 5, 2025
@Alvaro-Kothe Alvaro-Kothe changed the title BUG: make read_csv read large integers (>64bits) as python strings with C engine BUG: make read_csv read large integers (>64bits) as python integers with C engine Oct 5, 2025
@Alvaro-Kothe Alvaro-Kothe marked this pull request as draft October 5, 2025 12:28
@Alvaro-Kothe Alvaro-Kothe marked this pull request as ready for review October 5, 2025 13:06
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

Thanks I think this a net improvement in behavior

@mroeschke mroeschke added the IO CSV read_csv, to_csv label Oct 5, 2025
@mroeschke mroeschke added this to the 3.0 milestone Oct 5, 2025
@mroeschke mroeschke merged commit 21130b1 into pandas-dev:main Oct 5, 2025
46 checks passed
@mroeschke
Copy link
Member

Thanks @Alvaro-Kothe

@Alvaro-Kothe Alvaro-Kothe deleted the fix/read-csv-bigint branch October 6, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants