From 12ca76e0251bcff5104b5cb4f16c0e9410949532 Mon Sep 17 00:00:00 2001 From: tp Date: Sun, 21 Jul 2019 19:39:38 +0100 Subject: [PATCH] remove references to v0.19 in docs and code --- doc/source/getting_started/basics.rst | 2 -- doc/source/user_guide/categorical.rst | 2 -- doc/source/user_guide/computation.rst | 4 +--- doc/source/user_guide/io.rst | 10 ---------- doc/source/user_guide/merging.rst | 4 ---- doc/source/user_guide/text.rst | 2 -- doc/source/user_guide/timeseries.rst | 2 -- doc/source/user_guide/visualization.rst | 4 ---- pandas/core/algorithms.py | 2 -- pandas/core/arrays/categorical.py | 3 --- pandas/core/base.py | 4 ---- pandas/core/computation/ops.py | 2 -- pandas/core/dtypes/concat.py | 2 -- pandas/core/frame.py | 8 -------- pandas/core/generic.py | 8 -------- pandas/core/indexes/base.py | 4 ---- pandas/core/reshape/merge.py | 16 ---------------- pandas/core/series.py | 3 --- pandas/core/sorting.py | 2 -- pandas/core/tools/numeric.py | 2 -- pandas/core/util/hashing.py | 4 ---- pandas/core/window.py | 3 +-- pandas/io/excel/_base.py | 6 ------ pandas/io/formats/format.py | 2 -- pandas/io/html.py | 10 ---------- pandas/io/json/_json.py | 4 ---- pandas/io/pytables.py | 1 - pandas/io/stata.py | 2 -- pandas/tseries/offsets.py | 4 ---- 29 files changed, 2 insertions(+), 120 deletions(-) diff --git a/doc/source/getting_started/basics.rst b/doc/source/getting_started/basics.rst index 2edd242d8cad9..3f6f56376861f 100644 --- a/doc/source/getting_started/basics.rst +++ b/doc/source/getting_started/basics.rst @@ -2061,8 +2061,6 @@ Convert a subset of columns to a specified type using :meth:`~DataFrame.astype`. dft dft.dtypes -.. versionadded:: 0.19.0 - Convert certain columns to a specific dtype by passing a dict to :meth:`~DataFrame.astype`. .. ipython:: python diff --git a/doc/source/user_guide/categorical.rst b/doc/source/user_guide/categorical.rst index 7dca34385c1ee..8ca96ba0daa5e 100644 --- a/doc/source/user_guide/categorical.rst +++ b/doc/source/user_guide/categorical.rst @@ -834,8 +834,6 @@ See also the section on :ref:`merge dtypes` for notes about pres Unioning ~~~~~~~~ -.. versionadded:: 0.19.0 - If you want to combine categoricals that do not necessarily have the same categories, the :func:`~pandas.api.types.union_categoricals` function will combine a list-like of categoricals. The new categories will be the union of diff --git a/doc/source/user_guide/computation.rst b/doc/source/user_guide/computation.rst index 4f44fcaab63d4..22017a2aa8b42 100644 --- a/doc/source/user_guide/computation.rst +++ b/doc/source/user_guide/computation.rst @@ -408,9 +408,7 @@ For some windowing functions, additional parameters must be specified: Time-aware rolling ~~~~~~~~~~~~~~~~~~ -.. versionadded:: 0.19.0 - -New in version 0.19.0 are the ability to pass an offset (or convertible) to a ``.rolling()`` method and have it produce +It is possible to pass an offset (or convertible) to a ``.rolling()`` method and have it produce variable sized windows based on the passed time window. For each time point, this includes all preceding values occurring within the indicated time delta. diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index 8b21e4f29d994..135a6b89a9e55 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -454,8 +454,6 @@ worth trying. Specifying categorical dtype '''''''''''''''''''''''''''' -.. versionadded:: 0.19.0 - ``Categorical`` columns can be parsed directly by specifying ``dtype='category'`` or ``dtype=CategoricalDtype(categories, ordered)``. @@ -2193,8 +2191,6 @@ With max_level=1 the following snippet normalizes until 1st nesting level of the Line delimited json ''''''''''''''''''' -.. versionadded:: 0.19.0 - pandas is able to read and write line-delimited json files that are common in data processing pipelines using Hadoop or Spark. @@ -2492,16 +2488,12 @@ Specify values that should be converted to NaN: dfs = pd.read_html(url, na_values=['No Acquirer']) -.. versionadded:: 0.19 - Specify whether to keep the default set of NaN values: .. code-block:: python dfs = pd.read_html(url, keep_default_na=False) -.. versionadded:: 0.19 - Specify converters for columns. This is useful for numerical text data that has leading zeros. By default columns that are numerical are cast to numeric types and the leading zeros are lost. To avoid this, we can convert these @@ -2513,8 +2505,6 @@ columns to strings. dfs = pd.read_html(url_mcc, match='Telekom Albania', header=0, converters={'MNC': str}) -.. versionadded:: 0.19 - Use some combination of the above: .. code-block:: python diff --git a/doc/source/user_guide/merging.rst b/doc/source/user_guide/merging.rst index 6e63e672bb968..4c0d3b75a4f79 100644 --- a/doc/source/user_guide/merging.rst +++ b/doc/source/user_guide/merging.rst @@ -819,8 +819,6 @@ The ``indicator`` argument will also accept string arguments, in which case the Merge dtypes ~~~~~~~~~~~~ -.. versionadded:: 0.19.0 - Merging will preserve the dtype of the join keys. .. ipython:: python @@ -1386,8 +1384,6 @@ fill/interpolate missing data: Merging asof ~~~~~~~~~~~~ -.. versionadded:: 0.19.0 - A :func:`merge_asof` is similar to an ordered left-join except that we match on nearest key rather than equal keys. For each row in the ``left`` ``DataFrame``, we select the last row in the ``right`` ``DataFrame`` whose ``on`` key is less diff --git a/doc/source/user_guide/text.rst b/doc/source/user_guide/text.rst index 3255202d09a48..f9ef0f4984995 100644 --- a/doc/source/user_guide/text.rst +++ b/doc/source/user_guide/text.rst @@ -509,8 +509,6 @@ then ``extractall(pat).xs(0, level='match')`` gives the same result as ``Index`` also supports ``.str.extractall``. It returns a ``DataFrame`` which has the same result as a ``Series.str.extractall`` with a default index (starts from 0). -.. versionadded:: 0.19.0 - .. ipython:: python pd.Index(["a1a2", "b1", "c1"]).str.extractall(two_groups) diff --git a/doc/source/user_guide/timeseries.rst b/doc/source/user_guide/timeseries.rst index 5bdff441d9e1f..edfad9c15758c 100644 --- a/doc/source/user_guide/timeseries.rst +++ b/doc/source/user_guide/timeseries.rst @@ -1928,8 +1928,6 @@ objects: Period dtypes ~~~~~~~~~~~~~ -.. versionadded:: 0.19.0 - ``PeriodIndex`` has a custom ``period`` dtype. This is a pandas extension dtype similar to the :ref:`timezone aware dtype ` (``datetime64[ns, tz]``). diff --git a/doc/source/user_guide/visualization.rst b/doc/source/user_guide/visualization.rst index 6589900c8491c..96a896cae29a6 100644 --- a/doc/source/user_guide/visualization.rst +++ b/doc/source/user_guide/visualization.rst @@ -438,10 +438,6 @@ columns: .. _visualization.box.return: -.. warning:: - - The default changed from ``'dict'`` to ``'axes'`` in version 0.19.0. - In ``boxplot``, the return type can be controlled by the ``return_type``, keyword. The valid choices are ``{"axes", "dict", "both", None}``. Faceting, created by ``DataFrame.boxplot`` with the ``by`` keyword, will affect the output type as well: diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py index 2c38e071d3d44..6e24e6a38b5ab 100644 --- a/pandas/core/algorithms.py +++ b/pandas/core/algorithms.py @@ -816,8 +816,6 @@ def duplicated(values, keep="first"): """ Return boolean ndarray denoting duplicate values. - .. versionadded:: 0.19.0 - Parameters ---------- values : ndarray-like diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index df5cd12a479f0..fbcd6d55b1444 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -514,9 +514,6 @@ def astype(self, dtype, copy=True): By default, astype always returns a newly allocated object. If copy is set to False and dtype is categorical, the original object is returned. - - .. versionadded:: 0.19.0 - """ if is_categorical_dtype(dtype): # GH 10696/18593 diff --git a/pandas/core/base.py b/pandas/core/base.py index 9480e2e425f79..3f7a36764049e 100644 --- a/pandas/core/base.py +++ b/pandas/core/base.py @@ -1463,8 +1463,6 @@ def is_monotonic(self): Return boolean if values in the object are monotonic_increasing. - .. versionadded:: 0.19.0 - Returns ------- bool @@ -1481,8 +1479,6 @@ def is_monotonic_decreasing(self): Return boolean if values in the object are monotonic_decreasing. - .. versionadded:: 0.19.0 - Returns ------- bool diff --git a/pandas/core/computation/ops.py b/pandas/core/computation/ops.py index 9e6928372808e..59ed7143e6cd2 100644 --- a/pandas/core/computation/ops.py +++ b/pandas/core/computation/ops.py @@ -306,8 +306,6 @@ def _cast_inplace(terms, acceptable_dtypes, dtype): acceptable_dtypes : list of acceptable numpy.dtype Will not cast if term's dtype in this list. - .. versionadded:: 0.19.0 - dtype : str or numpy.dtype The dtype to cast to. """ diff --git a/pandas/core/dtypes/concat.py b/pandas/core/dtypes/concat.py index ac74ad5726a99..ef1f1ccdb4e16 100644 --- a/pandas/core/dtypes/concat.py +++ b/pandas/core/dtypes/concat.py @@ -225,8 +225,6 @@ def union_categoricals(to_union, sort_categories=False, ignore_order=False): Combine list-like of Categorical-like, unioning categories. All categories must have the same dtype. - .. versionadded:: 0.19.0 - Parameters ---------- to_union : list-like of Categorical, CategoricalIndex, diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 8fdfc960603c6..967815c47511c 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2043,9 +2043,6 @@ def to_stata( variable_labels : dict Dictionary containing columns as keys and variable labels as values. Each label must be 80 characters or smaller. - - .. versionadded:: 0.19.0 - version : {114, 117}, default 114 Version to use in the output dta file. Version 114 can be used read by Stata 10 and later. Version 117 can be read by Stata 13 @@ -2074,8 +2071,6 @@ def to_stata( * Column listed in convert_dates is not in DataFrame * Categorical label contains more than 32,000 characters - .. versionadded:: 0.19.0 - See Also -------- read_stata : Import Stata data files. @@ -2265,9 +2260,6 @@ def to_html( border : int A ``border=border`` attribute is included in the opening `` tag. Default ``pd.options.display.html.border``. - - .. versionadded:: 0.19.0 - table_id : str, optional A css id is included in the opening `
` tag if specified. diff --git a/pandas/core/generic.py b/pandas/core/generic.py index ecc421df3fbb1..d6bbc19084e10 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2328,8 +2328,6 @@ def to_json( throw ValueError if incorrect 'orient' since others are not list like. - .. versionadded:: 0.19.0 - compression : {'infer', 'gzip', 'bz2', 'zip', 'xz', None} A string representing the compression to use in the output file, @@ -7088,8 +7086,6 @@ def asof(self, where, subset=None): In case of a :class:`~pandas.DataFrame`, the last row without NaN considering only the subset of columns (if not `None`) - .. versionadded:: 0.19.0 For DataFrame - If there is no good value, NaN is returned for a Series or a Series of NaN values for a DataFrame @@ -8207,14 +8203,10 @@ def resample( For a DataFrame, column to use instead of index for resampling. Column must be datetime-like. - .. versionadded:: 0.19.0 - level : str or int, optional For a MultiIndex, level (name or number) to use for resampling. `level` must be datetime-like. - .. versionadded:: 0.19.0 - Returns ------- Resampler object diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index bf94bf7ab6489..3f9b38e84c066 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -788,8 +788,6 @@ def view(self, cls=None): satisfied, the original data is used to create a new Index or the original Index is returned. - .. versionadded:: 0.19.0 - Returns ------- Index @@ -3993,8 +3991,6 @@ def memory_usage(self, deep=False): entries are from self where cond is True and otherwise are from other. - .. versionadded:: 0.19.0 - Parameters ---------- cond : boolean array-like with the same length as self diff --git a/pandas/core/reshape/merge.py b/pandas/core/reshape/merge.py index c1a07c129f7cd..39cdd450e17c6 100644 --- a/pandas/core/reshape/merge.py +++ b/pandas/core/reshape/merge.py @@ -217,8 +217,6 @@ def merge_ordered( * outer: use union of keys from both frames (SQL: full outer join) * inner: use intersection of keys from both frames (SQL: inner join) - .. versionadded:: 0.19.0 - Returns ------- merged : DataFrame @@ -328,8 +326,6 @@ def merge_asof( Optionally match on equivalent keys with 'by' before searching with 'on'. - .. versionadded:: 0.19.0 - Parameters ---------- left : DataFrame @@ -345,26 +341,14 @@ def merge_asof( Field name to join on in right DataFrame. left_index : boolean Use the index of the left DataFrame as the join key. - - .. versionadded:: 0.19.2 - right_index : boolean Use the index of the right DataFrame as the join key. - - .. versionadded:: 0.19.2 - by : column name or list of column names Match on these columns before performing merge operation. left_by : column name Field names to match on in the left DataFrame. - - .. versionadded:: 0.19.2 - right_by : column name Field names to match on in the right DataFrame. - - .. versionadded:: 0.19.2 - suffixes : 2-length sequence (tuple, list, ...) Suffix to apply to overlapping column names in the left and right side, respectively. diff --git a/pandas/core/series.py b/pandas/core/series.py index 1f63d8d92f1c0..90f069542d332 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -2700,9 +2700,6 @@ def append(self, to_append, ignore_index=False, verify_integrity=False): Series to append with self. ignore_index : bool, default False If True, do not use the index labels. - - .. versionadded:: 0.19.0 - verify_integrity : bool, default False If True, raise Exception on creating index with duplicates. diff --git a/pandas/core/sorting.py b/pandas/core/sorting.py index 523c4dc5e867b..5f3ed87424d0e 100644 --- a/pandas/core/sorting.py +++ b/pandas/core/sorting.py @@ -399,8 +399,6 @@ def safe_sort(values, labels=None, na_sentinel=-1, assume_unique=False, verify=T ``values`` should be unique if ``labels`` is not None. Safe for use with mixed types (int, str), orders ints before strs. - .. versionadded:: 0.19.0 - Parameters ---------- values : list-like diff --git a/pandas/core/tools/numeric.py b/pandas/core/tools/numeric.py index e1a976b874c25..a0e2c8d9cab65 100644 --- a/pandas/core/tools/numeric.py +++ b/pandas/core/tools/numeric.py @@ -59,8 +59,6 @@ def to_numeric(arg, errors="raise", downcast=None): checked satisfy that specification, no downcasting will be performed on the data. - .. versionadded:: 0.19.0 - Returns ------- ret : numeric if parsing succeeded. diff --git a/pandas/core/util/hashing.py b/pandas/core/util/hashing.py index f5ab81ad9089e..73e126cf230a5 100644 --- a/pandas/core/util/hashing.py +++ b/pandas/core/util/hashing.py @@ -60,8 +60,6 @@ def hash_pandas_object( """ Return a data hash of the Index/Series/DataFrame - .. versionadded:: 0.19.2 - Parameters ---------- index : boolean, default True @@ -245,8 +243,6 @@ def hash_array(vals, encoding="utf8", hash_key=None, categorize=True): """ Given a 1d array, return an array of deterministic integers. - .. versionadded:: 0.19.2 - Parameters ---------- vals : ndarray, Categorical diff --git a/pandas/core/window.py b/pandas/core/window.py index 20d5453cc43a2..7f4ec3e96c75b 100644 --- a/pandas/core/window.py +++ b/pandas/core/window.py @@ -485,8 +485,7 @@ class Window(_Window): If its an offset then this will be the time period of each window. Each window will be a variable sized based on the observations included in - the time-period. This is only valid for datetimelike indexes. This is - new in 0.19.0 + the time-period. This is only valid for datetimelike indexes. min_periods : int, default None Minimum number of observations in window required to have a value (otherwise result is NA). For a window that is specified by an offset, diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index 763b12949ba0a..7afc234446a71 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -120,14 +120,8 @@ content. true_values : list, default None Values to consider as True. - - .. versionadded:: 0.19.0 - false_values : list, default None Values to consider as False. - - .. versionadded:: 0.19.0 - skiprows : list-like Rows to skip at the beginning (0-indexed). nrows : int, default None diff --git a/pandas/io/formats/format.py b/pandas/io/formats/format.py index 11b69064723c5..1589e339bc884 100644 --- a/pandas/io/formats/format.py +++ b/pandas/io/formats/format.py @@ -846,8 +846,6 @@ def to_html( border : int A ``border=border`` attribute is included in the opening ``
`` tag. Default ``pd.options.display.html.border``. - - .. versionadded:: 0.19.0 """ from pandas.io.formats.html import HTMLFormatter, NotebookFormatter diff --git a/pandas/io/html.py b/pandas/io/html.py index 12c8ec4214b38..9d2647f226f00 100644 --- a/pandas/io/html.py +++ b/pandas/io/html.py @@ -1011,32 +1011,22 @@ def read_html( Character to recognize as decimal point (e.g. use ',' for European data). - .. versionadded:: 0.19.0 - converters : dict, default None Dict of functions for converting values in certain columns. Keys can either be integers or column labels, values are functions that take one input argument, the cell (not column) content, and return the transformed content. - .. versionadded:: 0.19.0 - na_values : iterable, default None Custom NA values - .. versionadded:: 0.19.0 - keep_default_na : bool, default True If na_values are specified and keep_default_na is False the default NaN values are overridden, otherwise they're appended to - .. versionadded:: 0.19.0 - displayed_only : bool, default True Whether elements with "display: none" should be parsed - .. versionadded:: 0.23.0 - Returns ------- dfs : list of DataFrames diff --git a/pandas/io/json/_json.py b/pandas/io/json/_json.py index ada7e6f43125d..4af362d8343f2 100644 --- a/pandas/io/json/_json.py +++ b/pandas/io/json/_json.py @@ -458,13 +458,9 @@ def read_json( encoding : str, default is 'utf-8' The encoding to use to decode py3 bytes. - .. versionadded:: 0.19.0 - lines : bool, default False Read the file as a json object per line. - .. versionadded:: 0.19.0 - chunksize : int, optional Return JsonReader object for iteration. See the `line-delimited json docs diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 3433d25609255..83e4aac30f2a1 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -303,7 +303,6 @@ def read_hdf(path_or_buf, key=None, mode="r", **kwargs): such as a file handler (e.g. via builtin ``open`` function) or ``StringIO``. - .. versionadded:: 0.19.0 support for pathlib, py.path. .. versionadded:: 0.21.0 support for __fspath__ protocol. key : object, optional diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 8dbcee829ee1e..32122a9daa1db 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -2096,8 +2096,6 @@ class StataWriter(StataParser): Dictionary containing columns as keys and variable labels as values. Each label must be 80 characters or smaller. - .. versionadded:: 0.19.0 - Returns ------- writer : StataWriter instance diff --git a/pandas/tseries/offsets.py b/pandas/tseries/offsets.py index 07b9598f15902..2edc6b99db721 100644 --- a/pandas/tseries/offsets.py +++ b/pandas/tseries/offsets.py @@ -1396,8 +1396,6 @@ class SemiMonthEnd(SemiMonthOffset): Two DateOffset's per month repeating on the last day of the month and day_of_month. - .. versionadded:: 0.19.0 - Parameters ---------- n : int @@ -1457,8 +1455,6 @@ class SemiMonthBegin(SemiMonthOffset): Two DateOffset's per month repeating on the first day of the month and day_of_month. - .. versionadded:: 0.19.0 - Parameters ---------- n : int