-
- Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Labels
Milestone
Description
In [4]: pd.__version__ Out[4]: u'0.18.1' The docstring for Series.replace refers to looking up column names, which AFAIK doesn't make sense for the Series version of replace. It seems like the Series function is just blindly inheriting the DataFrame docstring?
For example, the following trivial example of Series.replace() does not agree with the docstring:
import pandas as pd x = pd.DataFrame([dict(A=1, B=2, C=3), dict(A=2, B=3, C=4), dict(A=3, B=4, C=5)]) print(x.A.replace({1:0})) print(x.A) 0 0 1 2 2 3 Name: A, dtype: int64 0 1 1 2 2 3 Name: A, dtype: int64