Skip to content

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

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

4 participants