Skip to content

Commit 2bd1cf8

Browse files
committed
Merge pull request #3675 from cpcloud/remove-interpolate-3582
API: deprecate DataFrame.interpolate
2 parents 03d2d30 + ca752ff commit 2bd1cf8

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

RELEASE.rst

+6-1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ pandas 0.11.1
9696
- The ``raise_on_error`` option to plotting methods is obviated by GH3572_,
9797
so it is removed. Plots now always raise when data cannot be plotted or the
9898
object being plotted has a dtype of ``object``.
99+
- ``DataFrame.interpolate()`` is now deprecated. Please use
100+
``DataFrame.fillna()`` and ``DataFrame.replace()`` instead (GH3582_,
101+
GH3675_, GH3676_).
99102

100103
**Bug Fixes**
101104

@@ -233,9 +236,11 @@ pandas 0.11.1
233236
.. _GH3606: https://github.com/pydata/pandas/issues/3606
234237
.. _GH3659: https://github.com/pydata/pandas/issues/3659
235238
.. _GH3649: https://github.com/pydata/pandas/issues/3649
236-
.. _Gh3616: https://github.com/pydata/pandas/issues/3616
237239
.. _GH1818: https://github.com/pydata/pandas/issues/1818
238240
.. _GH3572: https://github.com/pydata/pandas/issues/3572
241+
.. _GH3582: https://github.com/pydata/pandas/issues/3582
242+
.. _GH3676: https://github.com/pydata/pandas/issues/3676
243+
.. _GH3675: https://github.com/pydata/pandas/issues/3675
239244

240245
pandas 0.11.0
241246
=============

doc/source/v0.11.1.txt

+6
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ API changes
6767
and thus you should cast to an appropriate numeric dtype if you need to
6868
plot something.
6969

70+
- ``DataFrame.interpolate()`` is now deprecated. Please use
71+
``DataFrame.fillna()`` and ``DataFrame.replace()`` instead. (GH3582_,
72+
GH3675_, GH3676_)
7073

7174

7275
Enhancements
@@ -241,3 +244,6 @@ on GitHub for a complete list.
241244
.. _GH3656: https://github.com/pydata/pandas/issues/3656
242245
.. _GH1818: https://github.com/pydata/pandas/issues/1818
243246
.. _GH3572: https://github.com/pydata/pandas/issues/3572
247+
.. _GH3582: https://github.com/pydata/pandas/issues/3582
248+
.. _GH3676: https://github.com/pydata/pandas/issues/3676
249+
.. _GH3675: https://github.com/pydata/pandas/issues/3675

pandas/core/frame.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -3506,7 +3506,7 @@ def replace(self, to_replace=None, value=None, method='pad', axis=0,
35063506
35073507
See also
35083508
--------
3509-
reindex, asfreq, fillna, interpolate
3509+
reindex, asfreq, fillna
35103510
35113511
Returns
35123512
-------
@@ -3678,6 +3678,10 @@ def interpolate(self, to_replace, method='pad', axis=0, inplace=False,
36783678
--------
36793679
reindex, replace, fillna
36803680
"""
3681+
from warnings import warn
3682+
warn('DataFrame.interpolate will be removed in v0.12, please use '
3683+
'either DataFrame.fillna or DataFrame.replace instead',
3684+
FutureWarning)
36813685
if self._is_mixed_type and axis == 1:
36823686
return self.T.replace(to_replace, method=method, limit=limit).T
36833687

0 commit comments

Comments
 (0)