Skip to content

BUG: make Series handle dtype='int64' for string array #48333

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

Merged
merged 5 commits into from
Sep 12, 2022

Conversation

5j9
Copy link
Contributor

@5j9 5j9 commented Aug 31, 2022

@5j9 5j9 closed this Aug 31, 2022
@5j9 5j9 reopened this Aug 31, 2022
@5j9 5j9 marked this pull request as draft August 31, 2022 18:09
@5j9 5j9 marked this pull request as ready for review August 31, 2022 19:19
@mroeschke mroeschke added Dtype Conversions Unexpected or buggy dtype conversions Strings String extension data type and string data labels Sep 1, 2022
Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

I think this disables to many checks, for example:

x = pd.Series(['300', '2'], dtype='int8')

This one finishes without warning and converts 300 to 44
while

x = pd.Series([300, 2], dtype='int8')

produces a FutureWarning and will raise in the future. I think we should check, if we are causing overflows here too

@5j9 5j9 marked this pull request as draft September 6, 2022 15:04
@5j9 5j9 marked this pull request as ready for review September 6, 2022 15:40
@5j9 5j9 requested review from phofl and removed request for jbrockmendel September 6, 2022 15:45
@phofl
Copy link
Member

phofl commented Sep 7, 2022

Please move whatsnew to 1.6.0

@mroeschke mroeschke added this to the 1.6 milestone Sep 12, 2022
@mroeschke mroeschke merged commit 9f9d80f into pandas-dev:main Sep 12, 2022
@mroeschke
Copy link
Member

Thanks @5j9

@mroeschke mroeschke modified the milestones: 1.6, 2.0 Oct 13, 2022
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
…8333)

* make sure conversion is not lossy

* add whatsnew and ref issue in test

* raise earlier

Note the comment at the last line:
# No known cases that get here

* mv whatsnew entry to 1.6.0.rst
@5j9 5j9 deleted the int64strings branch April 12, 2023 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Strings String extension data type and string data
Projects
None yet
3 participants