Skip to content

Conversation

@sharkipelago
Copy link
Contributor

I changed the behavior or series.round() to act like series.map(round) if the dtype is object as discussed in #61682. I put this in a new PR as the original intent of the other PR was to change DataFrame behavior. I'm unsure if the way I approached it is a good way to make the change though because I saw in core/internals/blocks.py that Block's round() method is intended to raise an error for dtype of object. So I wasn't sure I should approach this by updated the Block class instead. Any feedback is appreciated!

@jbrockmendel
Copy link
Member

that Block's round() method is intended to raise an error for dtype of object

In another PR you're going to make DataFrame do the same thing this does, right? If so, you'll need to change the Block behavior.

@jbrockmendel
Copy link
Member

i suspect this will also fix/change the DataFrame.round behavior? can you test that and address it in the whatsnew note

@github-actions
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Oct 23, 2025
self.values.shape
)
except TypeError as err:
raise TypeError("Expected numeric entries for dtype object.") from err
Copy link
Member

Choose a reason for hiding this comment

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

i dont think its necessary to catch-and-reraise

raise TypeError("Expected numeric entries for dtype object.") from err

refs = None
if values is self.values:
Copy link
Member

Choose a reason for hiding this comment

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

is it possible to have values is self.values? my intuition is "no"

@jbrockmendel
Copy link
Member

@sharkipelago can you merge main and address comments. i think this is getting close to ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants