Skip to content

API: Series(floaty, dtype=inty) #49609

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 13 commits into from
Dec 15, 2022
Merged

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel added API Design Constructors Series/DataFrame/Index/pd.array Constructors labels Nov 14, 2022
@mroeschke
Copy link
Member

If a user want to cast to int with float data, would they have to do ser.round().astype(int) (assuming the "safe casting" astype isn't implemented)?

@jbrockmendel
Copy link
Member Author

If a user want to cast to int with float data, would they have to do ser.round().astype(int) (assuming the "safe casting" astype isn't implemented)?

Yes.

@mroeschke
Copy link
Member

Cool could you add this "if you want to do this" behavior in the whatsnew?

@mroeschke
Copy link
Member

cc @seberg just noting that pandas probably will move forward with this behavior which doesn't currently align with numpy

@MarcoGorelli MarcoGorelli self-requested a review December 13, 2022 19:28
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.

Small comment, otherwise lgtm

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.

Looks good to me besides @phofl comment

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Looks good to me, nice!

@phofl phofl added this to the 2.0 milestone Dec 15, 2022
@phofl phofl merged commit 00fa270 into pandas-dev:main Dec 15, 2022
@phofl
Copy link
Member

phofl commented Dec 15, 2022

thx @jbrockmendel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Constructors Series/DataFrame/Index/pd.array Constructors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API: Series(floaty, dtype=inty)
4 participants