I cannot understand what the to_replace
argument of pandas.DataSeries.interpolate
method means. The online documentation does not specify this. Here is my session:
>>> import pandas as pd
>>> df = pd.DataFrame({'x': [1.0,1.1,1.2]},index=[1,2,4])
>>> df.interpolate()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: interpolate() takes at least 2 arguments (1 given)
>>> pd.__version__
'0.12.0'
>>> print df.interpolate.__doc__
Interpolate values according to different methods.
Parameters
----------
to_replace : dict, Series
method : str
axis : int
inplace : bool
limit : int, default None
Returns
-------
frame : interpolated
See Also
--------
reindex, replace, fillna
>>> import inspect
>>> print inspect.getargspec(df.interpolate)
ArgSpec(args=['self', 'to_replace', 'method', 'axis', 'inplace', 'limit'], varargs=None, keywords=None, defaults=('pad', 0, False, None))
The online documentation does not mention the DataFrame.interpolate
method... and the Series.interpolate
method does not have the `to_replace' argument.