Skip to content

Conversation

@a-y-khan
Copy link
Contributor

I used is_scalar() instead of is_numeric() to allow data structures like pd.Timestamp to be used in replace(). See tests in pandas/tests/frame/methods/test_replace.py, pandas/tests/series/methods/test_replace.py for examples.

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

Thanks for the PR

@a-y-khan a-y-khan requested a review from WillAyd February 14, 2020 05:32
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm

@WillAyd WillAyd added the Error Reporting Incorrect or improved errors from pandas label Feb 20, 2020
@a-y-khan a-y-khan requested a review from jreback February 27, 2020 06:52
@jreback jreback added this to the 1.1 milestone Mar 3, 2020
@jreback jreback merged commit ebf9668 into pandas-dev:master Mar 3, 2020
@jreback
Copy link
Contributor

jreback commented Mar 3, 2020

thanks @a-y-khan

@a-y-khan
Copy link
Contributor Author

a-y-khan commented Mar 3, 2020

Glad I could make a contribution!

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

Labels

Error Reporting Incorrect or improved errors from pandas

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Series.replace() should raise an exception if invalid argument is given

3 participants