diff --git a/doc/source/io.rst b/doc/source/io.rst
index e7c1cc13d103d..74a604339cddb 100644
--- a/doc/source/io.rst
+++ b/doc/source/io.rst
@@ -137,8 +137,10 @@ usecols : array-like or callable, default ``None``
Using this parameter results in much faster parsing time and lower memory usage.
as_recarray : boolean, default ``False``
- DEPRECATED: this argument will be removed in a future version. Please call
- ``pd.read_csv(...).to_records()`` instead.
+
+ .. deprecated:: 0.18.2
+
+ Please call ``pd.read_csv(...).to_records()`` instead.
Return a NumPy recarray instead of a DataFrame after parsing the data. If
set to ``True``, this option takes precedence over the ``squeeze`` parameter.
@@ -191,7 +193,11 @@ skiprows : list-like or integer, default ``None``
skipfooter : int, default ``0``
Number of lines at bottom of file to skip (unsupported with engine='c').
skip_footer : int, default ``0``
- DEPRECATED: use the ``skipfooter`` parameter instead, as they are identical
+
+ .. deprecated:: 0.19.0
+
+ Use the ``skipfooter`` parameter instead, as they are identical
+
nrows : int, default ``None``
Number of rows of file to read. Useful for reading pieces of large files.
low_memory : boolean, default ``True``
@@ -202,16 +208,25 @@ low_memory : boolean, default ``True``
use the ``chunksize`` or ``iterator`` parameter to return the data in chunks.
(Only valid with C parser)
buffer_lines : int, default None
- DEPRECATED: this argument will be removed in a future version because its
- value is not respected by the parser
+
+ .. deprecated:: 0.19.0
+
+ Argument removed because its value is not respected by the parser
+
compact_ints : boolean, default False
- DEPRECATED: this argument will be removed in a future version
+
+ .. deprecated:: 0.19.0
+
+ Argument moved to ``pd.to_numeric``
If ``compact_ints`` is ``True``, then for any column that is of integer dtype, the
parser will attempt to cast it as the smallest integer ``dtype`` possible, either
signed or unsigned depending on the specification from the ``use_unsigned`` parameter.
use_unsigned : boolean, default False
- DEPRECATED: this argument will be removed in a future version
+
+ .. deprecated:: 0.18.2
+
+ Argument moved to ``pd.to_numeric``
If integer columns are being compacted (i.e. ``compact_ints=True``), specify whether
the column should be compacted to the smallest signed or unsigned integer dtype.
diff --git a/doc/sphinxext/numpydoc/README.rst b/doc/sphinxext/numpydoc/README.rst
index 89b9f2fd23e9b..f91811ef9add6 100755
--- a/doc/sphinxext/numpydoc/README.rst
+++ b/doc/sphinxext/numpydoc/README.rst
@@ -46,6 +46,6 @@ The following options can be set in conf.py:
methods and attributes. If a table of contents is made, Sphinx expects
each entry to have a separate page.
-- numpydoc_edit_link: bool (DEPRECATED -- edit your HTML template instead)
+- numpydoc_edit_link: bool (DEPRECATED -- edit your HTML template instead)
Whether to insert an edit link after docstrings.
diff --git a/pandas/core/categorical.py b/pandas/core/categorical.py
index ce70fb94b6cd4..796b2696af9ce 100644
--- a/pandas/core/categorical.py
+++ b/pandas/core/categorical.py
@@ -398,8 +398,8 @@ def itemsize(self):
def reshape(self, new_shape, *args, **kwargs):
"""
- DEPRECATED: calling this method will raise an error in a
- future release.
+ .. deprecated:: 0.19.0
+ Calling this method will raise an error in a future release.
An ndarray-compatible method that returns `self` because
`Categorical` instances cannot actually be reshaped.
@@ -430,7 +430,8 @@ def base(self):
@classmethod
def from_array(cls, data, **kwargs):
"""
- DEPRECATED: Use ``Categorical`` instead.
+ .. deprecated:: 0.19.0
+ Use ``Categorical`` instead.
Make a Categorical type from a single array-like object.
diff --git a/pandas/core/common.py b/pandas/core/common.py
index ed768a5743666..3b09e68c6433a 100644
--- a/pandas/core/common.py
+++ b/pandas/core/common.py
@@ -555,7 +555,8 @@ def in_qtconsole():
"""
check if we're inside an IPython qtconsole
- DEPRECATED: This is no longer needed, or working, in IPython 3 and above.
+ .. deprecated:: 0.14.1
+ This is no longer needed, or working, in IPython 3 and above.
"""
try:
ip = get_ipython() # noqa
@@ -573,8 +574,8 @@ def in_ipnb():
"""
check if we're inside an IPython Notebook
- DEPRECATED: This is no longer used in pandas, and won't work in IPython 3
- and above.
+ .. deprecated:: 0.14.1
+ This is no longer needed, or working, in IPython 3 and above.
"""
try:
ip = get_ipython() # noqa
diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index 7b56c30fcc9f6..6069757efc429 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -1338,9 +1338,9 @@ def to_sql(self, name, con, flavor=None, schema=None, if_exists='fail',
Using SQLAlchemy makes it possible to use any DB supported by that
library. If a DBAPI2 object, only sqlite3 is supported.
flavor : 'sqlite', default None
- DEPRECATED: this parameter will be removed in a future version,
- as 'sqlite' is the only supported option if SQLAlchemy is not
- installed.
+ .. deprecated:: 0.19.0
+ 'sqlite' is the only supported option if SQLAlchemy is not
+ used.
schema : string, default None
Specify the schema (if database flavor supports this). If None, use
default schema.
@@ -3498,7 +3498,9 @@ def astype(self, dtype, copy=True, errors='raise', **kwargs):
.. versionadded:: 0.20.0
- raise_on_error : DEPRECATED use ``errors`` instead
+ raise_on_error : raise on invalid input
+ .. deprecated:: 0.20.0
+ Use ``errors`` instead
kwargs : keyword arguments to pass on to the constructor
Returns
@@ -3602,7 +3604,6 @@ def convert_objects(self, convert_dates=True, convert_numeric=False,
convert_timedeltas=True, copy=True):
"""
Deprecated.
-
Attempt to infer better dtype for object columns
Parameters
@@ -5809,8 +5810,9 @@ def tz_localize(self, tz, axis=0, level=None, copy=True,
- 'NaT' will return NaT where there are ambiguous times
- 'raise' will raise an AmbiguousTimeError if there are ambiguous
times
- infer_dst : boolean, default False (DEPRECATED)
- Attempt to infer fall dst-transition hours based on order
+ infer_dst : boolean, default False
+ .. deprecated:: 0.15.0
+ Attempt to infer fall dst-transition hours based on order
Returns
-------
diff --git a/pandas/core/indexes/datetimes.py b/pandas/core/indexes/datetimes.py
index 239894cff3874..d8aae2367976b 100644
--- a/pandas/core/indexes/datetimes.py
+++ b/pandas/core/indexes/datetimes.py
@@ -197,8 +197,9 @@ class DatetimeIndex(DatelikeOps, TimelikeOps, DatetimeIndexOpsMixin,
times)
- 'NaT' will return NaT where there are ambiguous times
- 'raise' will raise an AmbiguousTimeError if there are ambiguous times
- infer_dst : boolean, default False (DEPRECATED)
- Attempt to infer fall dst-transition hours based on order
+ infer_dst : boolean, default False
+ .. deprecated:: 0.15.0
+ Attempt to infer fall dst-transition hours based on order
name : object
Name to be stored in the index
@@ -1818,8 +1819,9 @@ def tz_localize(self, tz, ambiguous='raise', errors='raise'):
.. versionadded:: 0.19.0
- infer_dst : boolean, default False (DEPRECATED)
- Attempt to infer fall dst-transition hours based on order
+ infer_dst : boolean, default False
+ .. deprecated:: 0.15.0
+ Attempt to infer fall dst-transition hours based on order
Returns
-------
diff --git a/pandas/core/indexes/period.py b/pandas/core/indexes/period.py
index f8af6c8303d99..9d1a49e13c804 100644
--- a/pandas/core/indexes/period.py
+++ b/pandas/core/indexes/period.py
@@ -558,7 +558,8 @@ def asfreq(self, freq=None, how='E'):
def to_datetime(self, dayfirst=False):
"""
- DEPRECATED: use :meth:`to_timestamp` instead.
+ .. deprecated:: 0.19.0
+ Use :meth:`to_timestamp` instead.
Cast to DatetimeIndex.
"""
diff --git a/pandas/core/panel4d.py b/pandas/core/panel4d.py
index f32de29c5c167..16e7d0dfcc336 100644
--- a/pandas/core/panel4d.py
+++ b/pandas/core/panel4d.py
@@ -19,10 +19,10 @@
having 4 named dimensions. It is intended as a test bed for more
N-Dimensional named containers.
- DEPRECATED. Panel4D is deprecated and will be removed in a future version.
- The recommended way to represent these types of n-dimensional data are with
- the `xarray package `__.
- Pandas provides a `.to_xarray()` method to automate this conversion.
+ .. deprecated:: 0.19.0
+ The recommended way to represent these types of n-dimensional data
+ are with the `xarray package `__.
+ Pandas provides a `.to_xarray()` method to automate this conversion.
Parameters
----------
diff --git a/pandas/core/panelnd.py b/pandas/core/panelnd.py
index 26ceeea654e4e..7a5cb63cd4f07 100644
--- a/pandas/core/panelnd.py
+++ b/pandas/core/panelnd.py
@@ -9,10 +9,10 @@ def create_nd_panel_factory(klass_name, orders, slices, slicer, aliases=None,
stat_axis=2, info_axis=0, ns=None):
""" manufacture a n-d class:
- DEPRECATED. Panelnd is deprecated and will be removed in a future version.
- The recommended way to represent these types of n-dimensional data are with
- the `xarray package `__.
- Pandas provides a `.to_xarray()` method to automate this conversion.
+ .. deprecated:: 0.19.0
+ The recommended way to represent these types of n-dimensional data
+ are with the `xarray package `__.
+ Pandas provides a `.to_xarray()` method to automate this conversion.
Parameters
----------
diff --git a/pandas/core/series.py b/pandas/core/series.py
index 74d4f3f955f26..e1f668dd3afda 100644
--- a/pandas/core/series.py
+++ b/pandas/core/series.py
@@ -850,8 +850,9 @@ def repeat(self, repeats, *args, **kwargs):
def reshape(self, *args, **kwargs):
"""
- DEPRECATED: calling this method will raise an error in a
- future release. Please call ``.values.reshape(...)`` instead.
+ .. deprecated:: 0.19.0
+ Calling this method will raise an error. Please call
+ ``.values.reshape(...)`` instead.
return an ndarray with the values shape
if the specified shape matches exactly the current shape, then
diff --git a/pandas/core/sparse/array.py b/pandas/core/sparse/array.py
index c75de01b98e4e..5c1cf8c773501 100644
--- a/pandas/core/sparse/array.py
+++ b/pandas/core/sparse/array.py
@@ -391,8 +391,8 @@ def to_dense(self, fill=None):
Parameters
----------
fill: float, default None
- DEPRECATED: this argument will be removed in a future version
- because it is not respected by this function.
+ .. deprecated:: 0.20.0
+ This argument is not respected by this function.
Returns
-------
diff --git a/pandas/core/strings.py b/pandas/core/strings.py
index 4814e78ee6546..cd7e313b13f1e 100644
--- a/pandas/core/strings.py
+++ b/pandas/core/strings.py
@@ -478,7 +478,7 @@ def str_match(arr, pat, case=True, flags=0, na=np.nan, as_indexer=None):
flags : int, default 0 (no flags)
re module flags, e.g. re.IGNORECASE
na : default NaN, fill value for missing values.
- as_indexer : DEPRECATED
+ as_indexer : DEPRECATED - Keyword is ignored.
Returns
-------
diff --git a/pandas/core/window.py b/pandas/core/window.py
index ba7e79944ab0e..01b1bdc3e5054 100644
--- a/pandas/core/window.py
+++ b/pandas/core/window.py
@@ -342,21 +342,23 @@ def aggregate(self, arg, *args, **kwargs):
Parameters
----------
- how : string, default None (DEPRECATED)
- Method for down- or re-sampling""")
+ how : string, default None
+ .. deprecated:: 0.18.0
+ Method for down- or re-sampling""")
_shared_docs['mean'] = dedent("""
%(name)s mean
Parameters
----------
- how : string, default None (DEPRECATED)
- Method for down- or re-sampling""")
+ how : string, default None
+ .. deprecated:: 0.18.0
+ Method for down- or re-sampling""")
class Window(_Window):
"""
- Provides rolling window calculcations.
+ Provides rolling window calculations.
.. versionadded:: 0.18.0
@@ -374,9 +376,10 @@ class Window(_Window):
Minimum number of observations in window required to have a value
(otherwise result is NA). For a window that is specified by an offset,
this will default to 1.
- freq : string or DateOffset object, optional (default None) (DEPRECATED)
- Frequency to conform the data to before computing the statistic.
- Specified as a frequency string or DateOffset object.
+ freq : string or DateOffset object, optional (default None)
+ .. deprecated:: 0.18.0
+ Frequency to conform the data to before computing the statistic.
+ Specified as a frequency string or DateOffset object.
center : boolean, default False
Set the labels at the center of the window.
win_type : string, default None
@@ -571,8 +574,9 @@ def _apply_window(self, mean=True, how=None, **kwargs):
----------
mean : boolean, default True
If True computes weighted mean, else weighted sum
- how : string, default to None (DEPRECATED)
- how to resample
+ how : string, default to None
+ .. deprecated:: 0.18.0
+ how to resample
Returns
-------
@@ -736,8 +740,9 @@ def _apply(self, func, name=None, window=None, center=None,
window : int/array, default to _get_window()
center : boolean, default to self.center
check_minp : function, default to _use_window
- how : string, default to None (DEPRECATED)
- how to resample
+ how : string, default to None
+ .. deprecated:: 0.18.0
+ how to resample
Returns
-------
@@ -864,8 +869,9 @@ def sum(self, *args, **kwargs):
Parameters
----------
- how : string, default 'max' (DEPRECATED)
- Method for down- or re-sampling""")
+ how : string, default 'max'
+ .. deprecated:: 0.18.0
+ Method for down- or re-sampling""")
def max(self, how=None, *args, **kwargs):
nv.validate_window_func('max', args, kwargs)
@@ -878,8 +884,9 @@ def max(self, how=None, *args, **kwargs):
Parameters
----------
- how : string, default 'min' (DEPRECATED)
- Method for down- or re-sampling""")
+ how : string, default 'min'
+ .. deprecated:: 0.18.0
+ Method for down- or re-sampling""")
def min(self, how=None, *args, **kwargs):
nv.validate_window_func('min', args, kwargs)
@@ -896,8 +903,9 @@ def mean(self, *args, **kwargs):
Parameters
----------
- how : string, default 'median' (DEPRECATED)
- Method for down- or re-sampling""")
+ how : string, default 'median'
+ .. deprecated:: 0.18.0
+ Method for down- or re-sampling""")
def median(self, how=None, **kwargs):
if self.freq is not None and how is None:
@@ -1329,9 +1337,10 @@ class Expanding(_Rolling_and_Expanding):
min_periods : int, default None
Minimum number of observations in window required to have a value
(otherwise result is NA).
- freq : string or DateOffset object, optional (default None) (DEPRECATED)
- Frequency to conform the data to before computing the statistic.
- Specified as a frequency string or DateOffset object.
+ freq : string or DateOffset object, optional (default None)
+ .. deprecated:: 0.18.0
+ Frequency to conform the data to before computing the statistic.
+ Specified as a frequency string or DateOffset object.
center : boolean, default False
Set the labels at the center of the window.
axis : int or string, default 0
@@ -1593,8 +1602,9 @@ class EWM(_Rolling):
min_periods : int, default 0
Minimum number of observations in window required to have a value
(otherwise result is NA).
- freq : None or string alias / date offset object, default=None (DEPRECATED)
- Frequency to conform to before computing statistic
+ freq : None or string alias / date offset object, default=None
+ .. deprecated:: 0.18.0
+ Frequency to conform to before computing statistic
adjust : boolean, default True
Divide by decaying adjustment factor in beginning periods to account
for imbalance in relative weightings (viewing EWMA as a moving average)
@@ -1727,8 +1737,9 @@ def _apply(self, func, how=None, **kwargs):
Parameters
----------
func : string/callable to apply
- how : string, default to None (DEPRECATED)
- how to resample
+ how : string, default to None
+ .. deprecated:: 0.18.0
+ how to resample
Returns
-------
diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py
index 0350849037391..343bc7a74fde8 100755
--- a/pandas/io/parsers.py
+++ b/pandas/io/parsers.py
@@ -105,8 +105,8 @@
['AAA', 'BBB', 'DDD']``. Using this parameter results in much faster
parsing time and lower memory usage.
as_recarray : boolean, default False
- DEPRECATED: this argument will be removed in a future version. Please call
- `pd.read_csv(...).to_records()` instead.
+ .. deprecated:: 0.19.0
+ Please call `pd.read_csv(...).to_records()` instead.
Return a NumPy recarray instead of a DataFrame after parsing the data.
If set to True, this option takes precedence over the `squeeze` parameter.
@@ -145,7 +145,8 @@
skipfooter : int, default 0
Number of lines at bottom of file to skip (Unsupported with engine='c')
skip_footer : int, default 0
- DEPRECATED: use the `skipfooter` parameter instead, as they are identical
+ .. deprecated:: 0.19.0
+ Use the `skipfooter` parameter instead, as they are identical
nrows : int, default None
Number of rows of file to read. Useful for reading pieces of large files
na_values : scalar, str, list-like, or dict, default None
@@ -277,17 +278,19 @@
use the `chunksize` or `iterator` parameter to return the data in chunks.
(Only valid with C parser)
buffer_lines : int, default None
- DEPRECATED: this argument will be removed in a future version because its
- value is not respected by the parser
+ .. deprecated:: 0.19.0
+ This argument is not respected by the parser
compact_ints : boolean, default False
- DEPRECATED: this argument will be removed in a future version
+ .. deprecated:: 0.19.0
+ Argument moved to ``pd.to_numeric``
If compact_ints is True, then for any column that is of integer dtype,
the parser will attempt to cast it as the smallest integer dtype possible,
either signed or unsigned depending on the specification from the
`use_unsigned` parameter.
use_unsigned : boolean, default False
- DEPRECATED: this argument will be removed in a future version
+ .. deprecated:: 0.19.0
+ Argument moved to ``pd.to_numeric``
If integer columns are being compacted (i.e. `compact_ints=True`), specify
whether the column should be compacted to the smallest signed or unsigned
diff --git a/pandas/io/sql.py b/pandas/io/sql.py
index ee992c6dd3439..0dbef66616e43 100644
--- a/pandas/io/sql.py
+++ b/pandas/io/sql.py
@@ -432,7 +432,9 @@ def to_sql(frame, name, con, flavor=None, schema=None, if_exists='fail',
library.
If a DBAPI2 object, only sqlite3 is supported.
flavor : 'sqlite', default None
- DEPRECATED: this parameter will be removed in a future version
+ .. deprecated:: 0.19.0
+ 'sqlite' is the only supported option if SQLAlchemy is not
+ used.
schema : string, default None
Name of SQL schema in database to write to (if database flavor
supports this). If None, use default schema (default).
@@ -484,7 +486,9 @@ def has_table(table_name, con, flavor=None, schema=None):
library.
If a DBAPI2 object, only sqlite3 is supported.
flavor : 'sqlite', default None
- DEPRECATED: this parameter will be removed in a future version
+ .. deprecated:: 0.19.0
+ 'sqlite' is the only supported option if SQLAlchemy is not
+ installed.
schema : string, default None
Name of SQL schema in database to write to (if database flavor supports
this). If None, use default schema (default).
@@ -1545,7 +1549,9 @@ def get_schema(frame, name, flavor=None, keys=None, con=None, dtype=None):
library, default: None
If a DBAPI2 object, only sqlite3 is supported.
flavor : 'sqlite', default None
- DEPRECATED: this parameter will be removed in a future version
+ .. deprecated:: 0.19.0
+ 'sqlite' is the only supported option if SQLAlchemy is not
+ installed.
dtype : dict of column name to SQL type, default None
Optional specifying the datatype for columns. The SQL type should
be a SQLAlchemy type, or a string for sqlite3 fallback connection.
diff --git a/pandas/io/stata.py b/pandas/io/stata.py
index e03e87f09173e..107dccfc8175c 100644
--- a/pandas/io/stata.py
+++ b/pandas/io/stata.py
@@ -110,9 +110,11 @@
_statafile_processing_params2, _chunksize_params,
_iterator_params)
-_data_method_doc = """Reads observations from Stata file, converting them into a dataframe
+_data_method_doc = """\
+Reads observations from Stata file, converting them into a dataframe
-This is a legacy method. Use `read` in new code.
+ .. deprecated::
+ This is a legacy method. Use `read` in new code.
Parameters
----------
@@ -1407,7 +1409,7 @@ def _read_strls(self):
self.GSO[str(v_o)] = va
# legacy
- @Appender('DEPRECATED: ' + _data_method_doc)
+ @Appender(_data_method_doc)
def data(self, **kwargs):
import warnings