Skip to content

Bug in Series.replace #4743

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

Closed
cpcloud opened this issue Sep 4, 2013 · 7 comments · Fixed by #4748
Closed

Bug in Series.replace #4743

cpcloud opened this issue Sep 4, 2013 · 7 comments · Fixed by #4748
Assignees
Labels
Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone

Comments

@cpcloud
Copy link
Member

cpcloud commented Sep 4, 2013

http://pandas.pydata.org/pandas-docs/dev/missing_data.html#replacing-generic-values

and scroll down a bit. Caught this in a doc build. I'll take a look at it.

@ghost ghost assigned cpcloud Sep 4, 2013
@jreback
Copy link
Contributor

jreback commented Sep 4, 2013

do that is fillna, but how do u interpret the list?

@cpcloud
Copy link
Member Author

cpcloud commented Sep 4, 2013

If you pass a list as to_replace you need to pass something to value as well. I don't handle the case of a single list...I'll at least put a more informative error message

@cpcloud
Copy link
Member Author

cpcloud commented Sep 4, 2013

i think we might have to keep the method parameter....

@cpcloud
Copy link
Member Author

cpcloud commented Sep 4, 2013

i have a fix for this but it feels really bolted on....then again this entire method could use a makeover

@jreback
Copy link
Contributor

jreback commented Sep 4, 2013

actually a list of to_replace with a method is ok; basically a ffill/pad for each of the to_replace elements

@cpcloud
Copy link
Member Author

cpcloud commented Sep 4, 2013

yep that's what my fix is

@cpcloud
Copy link
Member Author

cpcloud commented Sep 4, 2013

i'll put it up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants