From 68f08414b94f1ad7f71e15e94d426b9bc19bfdd6 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Sun, 13 Sep 2020 16:45:40 +0100 Subject: [PATCH 1/2] DOC/CLN: remove versionadded/changed:: 0.23 --- doc/source/development/extending.rst | 2 -- doc/source/getting_started/install.rst | 2 -- doc/source/user_guide/advanced.rst | 2 -- doc/source/user_guide/basics.rst | 2 -- doc/source/user_guide/categorical.rst | 2 -- doc/source/user_guide/dsintro.rst | 2 -- doc/source/user_guide/io.rst | 2 -- doc/source/user_guide/merging.rst | 4 --- doc/source/user_guide/missing_data.rst | 8 ++---- doc/source/user_guide/reshaping.rst | 2 -- doc/source/user_guide/text.rst | 6 ---- doc/source/user_guide/timedeltas.rst | 6 ---- doc/source/user_guide/timeseries.rst | 4 --- pandas/_libs/tslibs/nattype.pyx | 8 ++---- pandas/_libs/tslibs/timestamps.pyx | 9 ++---- pandas/core/algorithms.py | 2 -- pandas/core/arrays/base.py | 2 -- pandas/core/arrays/categorical.py | 2 -- pandas/core/arrays/datetimes.py | 4 --- pandas/core/arrays/interval.py | 10 ------- pandas/core/dtypes/base.py | 2 -- pandas/core/frame.py | 39 +++----------------------- pandas/core/generic.py | 19 ------------- pandas/core/groupby/groupby.py | 3 -- pandas/core/indexes/base.py | 4 --- pandas/core/resample.py | 2 -- pandas/core/reshape/concat.py | 1 - pandas/core/reshape/melt.py | 12 ++++---- pandas/core/reshape/reshape.py | 2 -- pandas/core/reshape/tile.py | 2 -- pandas/core/series.py | 10 ++----- pandas/core/shared_docs.py | 6 ++-- pandas/core/strings.py | 3 -- pandas/core/tools/datetimes.py | 2 -- pandas/core/window/ewm.py | 1 - pandas/core/window/expanding.py | 1 - pandas/core/window/rolling.py | 4 --- pandas/io/excel/_base.py | 3 -- pandas/io/formats/style.py | 4 --- pandas/io/html.py | 4 --- pandas/io/json/_json.py | 3 -- pandas/io/stata.py | 7 ----- pandas/plotting/_core.py | 4 --- 43 files changed, 19 insertions(+), 200 deletions(-) diff --git a/doc/source/development/extending.rst b/doc/source/development/extending.rst index 1e6b2c646fdfd..46c2cbbe39b34 100644 --- a/doc/source/development/extending.rst +++ b/doc/source/development/extending.rst @@ -73,8 +73,6 @@ applies only to certain dtypes. Extension types --------------- -.. versionadded:: 0.23.0 - .. warning:: The :class:`pandas.api.extensions.ExtensionDtype` and :class:`pandas.api.extensions.ExtensionArray` APIs are new and diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index c9ac1b0d284a3..fde9f567cc3ec 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -301,8 +301,6 @@ Optional dependencies for parsing HTML One of the following combinations of libraries is needed to use the top-level :func:`~pandas.read_html` function: -.. versionchanged:: 0.23.0 - * `BeautifulSoup4`_ and `html5lib`_ * `BeautifulSoup4`_ and `lxml`_ * `BeautifulSoup4`_ and `html5lib`_ and `lxml`_ diff --git a/doc/source/user_guide/advanced.rst b/doc/source/user_guide/advanced.rst index a0331dd632583..8cd35e94ae743 100644 --- a/doc/source/user_guide/advanced.rst +++ b/doc/source/user_guide/advanced.rst @@ -1065,8 +1065,6 @@ are closed on. Intervals are closed on the right side by default. pd.interval_range(start=0, end=4, closed='neither') -.. versionadded:: 0.23.0 - Specifying ``start``, ``end``, and ``periods`` will generate a range of evenly spaced intervals from ``start`` to ``end`` inclusively, with ``periods`` number of elements in the resulting ``IntervalIndex``: diff --git a/doc/source/user_guide/basics.rst b/doc/source/user_guide/basics.rst index 87359042928eb..6b13319061ea4 100644 --- a/doc/source/user_guide/basics.rst +++ b/doc/source/user_guide/basics.rst @@ -1877,8 +1877,6 @@ different columns. By indexes and values ~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 0.23.0 - Strings passed as the ``by`` parameter to :meth:`DataFrame.sort_values` may refer to either columns or index level names. diff --git a/doc/source/user_guide/categorical.rst b/doc/source/user_guide/categorical.rst index 7def45ddc13e2..b7475ae7bb132 100644 --- a/doc/source/user_guide/categorical.rst +++ b/doc/source/user_guide/categorical.rst @@ -112,8 +112,6 @@ only labels present in a given column are categories: df['B'] -.. versionadded:: 0.23.0 - Analogously, all columns in an existing ``DataFrame`` can be batch converted using :meth:`DataFrame.astype`: .. ipython:: python diff --git a/doc/source/user_guide/dsintro.rst b/doc/source/user_guide/dsintro.rst index 23bd44c1969a5..0e6767e88edc2 100644 --- a/doc/source/user_guide/dsintro.rst +++ b/doc/source/user_guide/dsintro.rst @@ -597,8 +597,6 @@ to be inserted (for example, a ``Series`` or NumPy array), or a function of one argument to be called on the ``DataFrame``. A *copy* of the original DataFrame is returned, with the new values inserted. -.. versionchanged:: 0.23.0 - Starting with Python 3.6 the order of ``**kwargs`` is preserved. This allows for *dependent* assignment, where an expression later in ``**kwargs`` can refer to a column created earlier in the same :meth:`~DataFrame.assign`. diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index 4dfabaa99fff6..a0b16e5fe5d1c 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -2360,8 +2360,6 @@ A few notes on the generated table schema: then ``level_`` is used. -.. versionadded:: 0.23.0 - ``read_json`` also accepts ``orient='table'`` as an argument. This allows for the preservation of metadata such as dtypes and index names in a round-trippable manner. diff --git a/doc/source/user_guide/merging.rst b/doc/source/user_guide/merging.rst index 0639e4a7bb5e4..bc8fc5a7e4f4e 100644 --- a/doc/source/user_guide/merging.rst +++ b/doc/source/user_guide/merging.rst @@ -175,8 +175,6 @@ behavior: .. warning:: - .. versionchanged:: 0.23.0 - The default behavior with ``join='outer'`` is to sort the other axis (columns in this case). In a future version of pandas, the default will be to not sort. We specified ``sort=False`` to opt in to the new @@ -1198,8 +1196,6 @@ done using the following code. Merging on a combination of columns and index levels ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 0.23 - Strings passed as the ``on``, ``left_on``, and ``right_on`` parameters may refer to either column names or index level names. This enables merging ``DataFrame`` instances on a combination of index levels and columns without diff --git a/doc/source/user_guide/missing_data.rst b/doc/source/user_guide/missing_data.rst index 28206192dd161..06a7c6e33768e 100644 --- a/doc/source/user_guide/missing_data.rst +++ b/doc/source/user_guide/missing_data.rst @@ -336,10 +336,6 @@ examined :ref:`in the API `. Interpolation ~~~~~~~~~~~~~ -.. versionadded:: 0.23.0 - - The ``limit_area`` keyword argument was added. - Both Series and DataFrame objects have :meth:`~DataFrame.interpolate` that, by default, performs linear interpolation at missing data points. @@ -507,8 +503,8 @@ By default, ``NaN`` values are filled in a ``forward`` direction. Use ser.interpolate(limit_direction='both') By default, ``NaN`` values are filled whether they are inside (surrounded by) -existing valid values, or outside existing valid values. Introduced in v0.23 -the ``limit_area`` parameter restricts filling to either inside or outside values. +existing valid values, or outside existing valid values. The ``limit_area`` +parameter restricts filling to either inside or outside values. .. ipython:: python diff --git a/doc/source/user_guide/reshaping.rst b/doc/source/user_guide/reshaping.rst index aa6bf44547040..1b90aeb00cf9c 100644 --- a/doc/source/user_guide/reshaping.rst +++ b/doc/source/user_guide/reshaping.rst @@ -679,8 +679,6 @@ To choose another dtype, use the ``dtype`` argument: pd.get_dummies(df, dtype=bool).dtypes -.. versionadded:: 0.23.0 - .. _reshaping.factorize: diff --git a/doc/source/user_guide/text.rst b/doc/source/user_guide/text.rst index 3408b98b3179d..e03ba74f95c90 100644 --- a/doc/source/user_guide/text.rst +++ b/doc/source/user_guide/text.rst @@ -282,8 +282,6 @@ following code will cause trouble because of the regular expression meaning of # We need to escape the special character (for >1 len patterns) dollars.str.replace(r'-\$', '-') -.. versionadded:: 0.23.0 - If you do want literal replacement of a string (equivalent to :meth:`str.replace`), you can set the optional ``regex`` parameter to ``False``, rather than escaping each character. In this case both ``pat`` @@ -390,8 +388,6 @@ Missing values on either side will result in missing values in the result as wel Concatenating a Series and something array-like into a Series ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. versionadded:: 0.23.0 - The parameter ``others`` can also be two-dimensional. In this case, the number or rows must match the lengths of the calling ``Series`` (or ``Index``). .. ipython:: python @@ -404,8 +400,6 @@ The parameter ``others`` can also be two-dimensional. In this case, the number o Concatenating a Series and an indexed object into a Series, with alignment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. versionadded:: 0.23.0 - For concatenation with a ``Series`` or ``DataFrame``, it is possible to align the indexes before concatenation by setting the ``join``-keyword. diff --git a/doc/source/user_guide/timedeltas.rst b/doc/source/user_guide/timedeltas.rst index 3439a0a4c13c7..b303c86ef9056 100644 --- a/doc/source/user_guide/timedeltas.rst +++ b/doc/source/user_guide/timedeltas.rst @@ -53,10 +53,6 @@ You can construct a ``Timedelta`` scalar through various arguments: pd.Timedelta('P0DT0H1M0S') pd.Timedelta('P0DT0H0M0.000000123S') -.. versionadded:: 0.23.0 - - Added constructor for `ISO 8601 Duration`_ strings - :ref:`DateOffsets` (``Day, Hour, Minute, Second, Milli, Micro, Nano``) can also be used in construction. .. ipython:: python @@ -387,8 +383,6 @@ The ``freq`` parameter can passed a variety of :ref:`frequency aliases DataFram Column labels to use when ``orient='index'``. Raises a ValueError if used with ``orient='columns'``. - .. versionadded:: 0.23.0 - Returns ------- DataFrame @@ -2115,7 +2104,6 @@ def to_stata( support Unicode characters, and version 119 supports more than 32,767 variables. - .. versionadded:: 0.23.0 .. versionchanged:: 1.0.0 Added support for formats 118 and 119. @@ -2125,9 +2113,6 @@ def to_stata( format. Only available if version is 117. Storing strings in the StrL format can produce smaller dta files if strings have more than 8 characters and values are repeated. - - .. versionadded:: 0.23.0 - compression : str or dict, default 'infer' For on-the-fly compression of the output dta. If string, specifies compression mode. If dict, value at key 'method' specifies @@ -2466,9 +2451,6 @@ def to_html( table_id : str, optional A css id is included in the opening `` tag if specified. - - .. versionadded:: 0.23.0 - render_links : bool, default False Convert URLs to HTML links. @@ -3700,10 +3682,6 @@ def assign(self, **kwargs) -> DataFrame: Later items in '\*\*kwargs' may refer to newly created or modified columns in 'df'; items are computed and assigned into 'df' in order. - .. versionchanged:: 0.23.0 - - Keyword argument order is maintained. - Examples -------- >>> df = pd.DataFrame({'temp_c': [17.0, 25.0]}, @@ -6604,9 +6582,6 @@ def groupby( specified, all remaining columns will be used and the result will have hierarchically indexed columns. - .. versionchanged:: 0.23.0 - Also accept list of column names. - Returns ------- DataFrame @@ -7204,7 +7179,6 @@ def unstack(self, level=-1, fill_value=None): _shared_docs["melt"] % dict( caller="df.melt(", - versionadded="\n .. versionadded:: 0.20.0\n", other="melt", ) ) @@ -7418,7 +7392,6 @@ def _gotitem( axis=_shared_doc_kwargs["axis"], see_also=_agg_summary_and_see_also_doc, examples=_agg_examples_doc, - versionadded="\n.. versionadded:: 0.20.0\n", ) def aggregate(self, func=None, axis=0, *args, **kwargs): axis = self._get_axis_number(axis) @@ -7518,9 +7491,6 @@ def apply(self, func, axis=0, raw=False, result_type=None, args=(), **kwds): applied function: list-like results will be returned as a Series of those. However if the apply function returns a Series these are expanded to columns. - - .. versionadded:: 0.23.0 - args : tuple Positional arguments to pass to `func` in addition to the array/series. @@ -7720,7 +7690,6 @@ def append( sort : bool, default False Sort columns if the columns of `self` and `other` are not aligned. - .. versionadded:: 0.23.0 .. versionchanged:: 1.0.0 Changed to not sort by default. diff --git a/pandas/core/generic.py b/pandas/core/generic.py index d7b82923e7488..d78fa42cd1056 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2214,8 +2214,6 @@ def to_json( Describing the data, where data component is like ``orient='records'``. - .. versionchanged:: 0.20.0 - date_format : {None, 'epoch', 'iso'} Type of date conversion. 'epoch' = epoch milliseconds, 'iso' = ISO8601. The default depends on the `orient`. For @@ -2251,9 +2249,6 @@ def to_json( Whether to include the index values in the JSON string. Not including the index (``index=False``) is only supported when orient is 'split' or 'table'. - - .. versionadded:: 0.23.0 - indent : int, optional Length of whitespace used to indent each record. @@ -3011,9 +3006,6 @@ def to_latex( into a main LaTeX document or read from an external file with ``\input{table.tex}``. - .. versionchanged:: 0.20.2 - Added to Series. - .. versionchanged:: 1.0.0 Added caption and label arguments. @@ -6404,9 +6396,6 @@ def replace( The method to use when for replacement, when `to_replace` is a scalar, list or tuple and `value` is ``None``. - .. versionchanged:: 0.23.0 - Added to DataFrame. - Returns ------- {klass} @@ -6836,8 +6825,6 @@ def interpolate( (interpolate). * 'outside': Only fill NaNs outside valid values (extrapolate). - .. versionadded:: 0.23.0 - downcast : optional, 'infer' or None, defaults to None Downcast dtypes if possible. **kwargs @@ -11349,12 +11336,6 @@ def _doc_parms(cls): min_count : int, default 0 The required number of valid values to perform the operation. If fewer than ``min_count`` non-NA values are present the result will be NA. - - .. versionadded:: 0.22.0 - - Added with the default being 0. This means the sum of an all-NA - or empty Series is 0, and the product of an all-NA or empty - Series is 1. """ diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 30bd53a3ddff1..ceee78bfebe68 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -215,8 +215,6 @@ class providing the base-class of operations. Apply a function `func` with arguments to this %(klass)s object and return the function's result. -%(versionadded)s - Use `.pipe` when you want to improve readability by chaining together functions that expect Series, DataFrames, GroupBy or Resampler objects. Instead of writing @@ -709,7 +707,6 @@ def __getattr__(self, attr: str): @Substitution( klass="GroupBy", - versionadded=".. versionadded:: 0.21.0", examples="""\ >>> df = pd.DataFrame({'A': 'a b a b'.split(), 'B': [1, 2, 3, 4]}) >>> df diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 04a63beb2ef45..3d177e08bb0f5 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -1553,8 +1553,6 @@ def droplevel(self, level=0): If resulting index has only 1 level left, the result will be of Index type, not MultiIndex. - .. versionadded:: 0.23.1 (support for non-MultiIndex) - Parameters ---------- level : int, str, or list-like, default 0 @@ -2296,8 +2294,6 @@ def unique(self, level=None): level : int or str, optional, default None Only return values from specified level (for MultiIndex). - .. versionadded:: 0.23.0 - Returns ------- Index without duplicates diff --git a/pandas/core/resample.py b/pandas/core/resample.py index 4ba253e76128e..f54ce5081d7d8 100644 --- a/pandas/core/resample.py +++ b/pandas/core/resample.py @@ -208,7 +208,6 @@ def _assure_grouper(self): @Substitution( klass="Resampler", - versionadded=".. versionadded:: 0.23.0", examples=""" >>> df = pd.DataFrame({'A': [1, 2, 3, 4]}, ... index=pd.date_range('2012-08-02', periods=4)) @@ -283,7 +282,6 @@ def pipe(self, func, *args, **kwargs): _shared_docs["aggregate"], see_also=_agg_see_also_doc, examples=_agg_examples_doc, - versionadded="", klass="DataFrame", axis="", ) diff --git a/pandas/core/reshape/concat.py b/pandas/core/reshape/concat.py index 9b94dae8556f6..dd4bcf77641ef 100644 --- a/pandas/core/reshape/concat.py +++ b/pandas/core/reshape/concat.py @@ -122,7 +122,6 @@ def concat( This has no effect when ``join='inner'``, which already preserves the order of the non-concatenation axis. - .. versionadded:: 0.23.0 .. versionchanged:: 1.0.0 Changed to not sort by default. diff --git a/pandas/core/reshape/melt.py b/pandas/core/reshape/melt.py index 33ce5ed49b9c2..e4be25b8448f8 100644 --- a/pandas/core/reshape/melt.py +++ b/pandas/core/reshape/melt.py @@ -24,7 +24,7 @@ @Appender( _shared_docs["melt"] - % dict(caller="pd.melt(df, ", versionadded="", other="DataFrame.melt") + % dict(caller="pd.melt(df, ", other="DataFrame.melt") ) def melt( frame: "DataFrame", @@ -274,12 +274,10 @@ def wide_to_long( A regular expression capturing the wanted suffixes. '\\d+' captures numeric suffixes. Suffixes with no numbers could be specified with the negated character class '\\D+'. You can also further disambiguate - suffixes, for example, if your wide variables are of the form - A-one, B-two,.., and you have an unrelated column A-rating, you can - ignore the last one by specifying `suffix='(!?one|two)'`. - - .. versionchanged:: 0.23.0 - When all suffixes are numeric, they are cast to int64/float64. + suffixes, for example, if your wide variables are of the form A-one, + B-two,.., and you have an unrelated column A-rating, you can ignore the + last one by specifying `suffix='(!?one|two)'`. When all suffixes are + numeric, they are cast to int64/float64. Returns ------- diff --git a/pandas/core/reshape/reshape.py b/pandas/core/reshape/reshape.py index e81dd8f0c735c..6ddf53b6493e3 100644 --- a/pandas/core/reshape/reshape.py +++ b/pandas/core/reshape/reshape.py @@ -764,8 +764,6 @@ def get_dummies( dtype : dtype, default np.uint8 Data type for new columns. Only a single dtype is allowed. - .. versionadded:: 0.23.0 - Returns ------- DataFrame diff --git a/pandas/core/reshape/tile.py b/pandas/core/reshape/tile.py index f7723bee532ff..077ad057f6e1d 100644 --- a/pandas/core/reshape/tile.py +++ b/pandas/core/reshape/tile.py @@ -84,8 +84,6 @@ def cut( Whether the first interval should be left-inclusive or not. duplicates : {default 'raise', 'drop'}, optional If bin edges are not unique, raise ValueError or drop non-uniques. - - .. versionadded:: 0.23.0 ordered : bool, default True Whether the labels are ordered or not. Applies to returned types Categorical and Series (with Categorical dtype). If True, diff --git a/pandas/core/series.py b/pandas/core/series.py index ef9ade5c7bb15..1d2c1ef59d299 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -118,7 +118,6 @@ optional_mapper="", optional_labels="", optional_axis="", - versionadded_to_excel="\n .. versionadded:: 0.20.0\n", ) @@ -157,12 +156,8 @@ class Series(base.IndexOpsMixin, generic.NDFrame): Parameters ---------- data : array-like, Iterable, dict, or scalar value - Contains data stored in Series. - - .. versionchanged:: 0.23.0 - If data is a dict, argument order is maintained for Python 3.6 - and later. - + Contains data stored in Series. If data is a dict, argument order is + maintained. index : array-like or Index (1d) Values must be hashable and have the same length as `data`. Non-unique index values are allowed. Will default to @@ -4047,7 +4042,6 @@ def _gotitem(self, key, ndim, subset=None) -> "Series": axis=_shared_doc_kwargs["axis"], see_also=_agg_see_also_doc, examples=_agg_examples_doc, - versionadded="\n.. versionadded:: 0.20.0\n", ) def aggregate(self, func=None, axis=0, *args, **kwargs): # Validate the axis parameter diff --git a/pandas/core/shared_docs.py b/pandas/core/shared_docs.py index 244ee3aa298db..14363dabfcdf3 100644 --- a/pandas/core/shared_docs.py +++ b/pandas/core/shared_docs.py @@ -6,7 +6,7 @@ "aggregate" ] = """\ Aggregate using one or more operations over the specified axis. -{versionadded} + Parameters ---------- func : function, str, list or dict @@ -119,8 +119,6 @@ This only applies if any of the groupers are Categoricals. If True: only show observed values for categorical groupers. If False: show all values for categorical groupers. - - .. versionadded:: 0.23.0 dropna : bool, default True If True, and if group keys contain NA values, NA values together with row/column will be dropped. @@ -154,7 +152,7 @@ columns, considered measured variables (`value_vars`), are "unpivoted" to the row axis, leaving just two non-identifier columns, 'variable' and 'value'. -%(versionadded)s + Parameters ---------- id_vars : tuple, list, or ndarray, optional diff --git a/pandas/core/strings.py b/pandas/core/strings.py index 4decd86764ccc..ab6c9cfb51414 100644 --- a/pandas/core/strings.py +++ b/pandas/core/strings.py @@ -602,8 +602,6 @@ def str_replace(arr, pat, repl, n=-1, case=None, flags=0, regex=True): - Cannot be set to False if `pat` is a compiled regex or `repl` is a callable. - .. versionadded:: 0.23.0 - Returns ------- Series or Index of object @@ -2374,7 +2372,6 @@ def cat(self, others=None, sep=None, na_rep=None, join="left"): to match the length of the calling Series/Index). To disable alignment, use `.values` on any Series/Index/DataFrame in `others`. - .. versionadded:: 0.23.0 .. versionchanged:: 1.0.0 Changed default of `join` from None to `'left'`. diff --git a/pandas/core/tools/datetimes.py b/pandas/core/tools/datetimes.py index 09a53d5a10ae6..ddb44898dbfad 100644 --- a/pandas/core/tools/datetimes.py +++ b/pandas/core/tools/datetimes.py @@ -680,8 +680,6 @@ def to_datetime( used when there are at least 50 values. The presence of out-of-bounds values will render the cache unusable and may slow down parsing. - .. versionadded:: 0.23.0 - .. versionchanged:: 0.25.0 - changed default value from False to True. diff --git a/pandas/core/window/ewm.py b/pandas/core/window/ewm.py index 4282cb41c4e91..34d9d9d8c00ef 100644 --- a/pandas/core/window/ewm.py +++ b/pandas/core/window/ewm.py @@ -278,7 +278,6 @@ def _constructor(self): _shared_docs["aggregate"], see_also=_agg_see_also_doc, examples=_agg_examples_doc, - versionadded="", klass="Series/Dataframe", axis="", ) diff --git a/pandas/core/window/expanding.py b/pandas/core/window/expanding.py index 46e002324ec75..319944fd48eae 100644 --- a/pandas/core/window/expanding.py +++ b/pandas/core/window/expanding.py @@ -117,7 +117,6 @@ def _get_window(self, other=None, **kwargs): _shared_docs["aggregate"], see_also=_agg_see_also_doc, examples=_agg_examples_doc, - versionadded="", klass="Series/Dataframe", axis="", ) diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index 648ab4d25be83..55bdd43bcb98e 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -1161,7 +1161,6 @@ def _get_window( _shared_docs["aggregate"], see_also=_agg_see_also_doc, examples=_agg_examples_doc, - versionadded="", klass="Series/DataFrame", axis="", ) @@ -1649,8 +1648,6 @@ def kurt(self, **kwargs): quantile : float Quantile to compute. 0 <= quantile <= 1. interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'} - .. versionadded:: 0.23.0 - This optional parameter specifies the interpolation method to use, when the desired quantile lies between two data points `i` and `j`: @@ -2042,7 +2039,6 @@ def _validate_freq(self): _shared_docs["aggregate"], see_also=_agg_see_also_doc, examples=_agg_examples_doc, - versionadded="", klass="Series/Dataframe", axis="", ) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index e9634ff0e9a05..65e95fd321772 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -124,9 +124,6 @@ Rows to skip at the beginning (0-indexed). nrows : int, default None Number of rows to parse. - - .. versionadded:: 0.23.0 - na_values : scalar, str, list-like, or dict, default None Additional strings to recognize as NA/NaN. If dict passed, specific per-column NA values. By default the following values are interpreted diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index 5c3a309b0e310..b5f0bc0a832c2 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -1027,8 +1027,6 @@ def hide_index(self) -> "Styler": """ Hide any indices from rendering. - .. versionadded:: 0.23.0 - Returns ------- self : Styler @@ -1040,8 +1038,6 @@ def hide_columns(self, subset) -> "Styler": """ Hide columns from rendering. - .. versionadded:: 0.23.0 - Parameters ---------- subset : IndexSlice diff --git a/pandas/io/html.py b/pandas/io/html.py index 8354cf413814e..40fde224a7ae9 100644 --- a/pandas/io/html.py +++ b/pandas/io/html.py @@ -161,8 +161,6 @@ class _HtmlFrameParser: displayed_only : bool Whether or not items with "display:none" should be ignored - .. versionadded:: 0.23.0 - Attributes ---------- io : str or file-like @@ -181,8 +179,6 @@ class _HtmlFrameParser: displayed_only : bool Whether or not items with "display:none" should be ignored - .. versionadded:: 0.23.0 - Notes ----- To subclass this class effectively you must override the following methods: diff --git a/pandas/io/json/_json.py b/pandas/io/json/_json.py index e3000788cb33a..c3977f89ac42f 100644 --- a/pandas/io/json/_json.py +++ b/pandas/io/json/_json.py @@ -428,9 +428,6 @@ def read_json( - The DataFrame columns must be unique for orients ``'index'``, ``'columns'``, and ``'records'``. - .. versionadded:: 0.23.0 - 'table' as an allowed value for the ``orient`` argument - typ : {'frame', 'series'}, default 'frame' The type of object to recover. diff --git a/pandas/io/stata.py b/pandas/io/stata.py index b3b16e04a5d9e..df5f6c3d53d30 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -164,8 +164,6 @@ path_or_buf : path (string), buffer or path object string, path object (pathlib.Path or py._path.local.LocalPath) or object implementing a binary read() functions. - - .. versionadded:: 0.23.0 support for pathlib, py.path. {_statafile_processing_params1} {_statafile_processing_params2} {_chunksize_params} @@ -2122,9 +2120,6 @@ class StataWriter(StataParser): object implementing a binary write() functions. If using a buffer then the buffer will not be automatically closed after the file is written. - - .. versionadded:: 0.23.0 support for pathlib, py.path. - data : DataFrame Input to save convert_dates : dict @@ -3000,8 +2995,6 @@ class StataWriter117(StataWriter): """ A class for writing Stata binary dta files in Stata 13 format (117) - .. versionadded:: 0.23.0 - Parameters ---------- fname : path (string), buffer or path object diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 45a3818492b44..d02f12a8e1029 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -542,12 +542,8 @@ def boxplot_frame_groupby( The layout of the plot: (rows, columns). sharex : bool, default False Whether x-axes will be shared among subplots. - - .. versionadded:: 0.23.1 sharey : bool, default True Whether y-axes will be shared among subplots. - - .. versionadded:: 0.23.1 backend : str, default None Backend to use instead of the backend specified in the option ``plotting.backend``. For instance, 'matplotlib'. Alternatively, to From 1ecca203d8566b93358679c580d38faf2e85276c Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Sun, 13 Sep 2020 18:34:44 +0100 Subject: [PATCH 2/2] lint and add ISO 8601 Duration ref --- doc/source/user_guide/timedeltas.rst | 2 +- pandas/core/frame.py | 8 +------- pandas/core/reshape/melt.py | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/doc/source/user_guide/timedeltas.rst b/doc/source/user_guide/timedeltas.rst index b303c86ef9056..3979ad1f3e949 100644 --- a/doc/source/user_guide/timedeltas.rst +++ b/doc/source/user_guide/timedeltas.rst @@ -18,7 +18,7 @@ parsing, and attributes. Parsing ------- -You can construct a ``Timedelta`` scalar through various arguments: +You can construct a ``Timedelta`` scalar through various arguments, including `ISO 8601 Duration`_ strings. .. ipython:: python diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 41d4200402309..27f9d594aabc6 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7175,13 +7175,7 @@ def unstack(self, level=-1, fill_value=None): return unstack(self, level, fill_value) - @Appender( - _shared_docs["melt"] - % dict( - caller="df.melt(", - other="melt", - ) - ) + @Appender(_shared_docs["melt"] % dict(caller="df.melt(", other="melt",)) def melt( self, id_vars=None, diff --git a/pandas/core/reshape/melt.py b/pandas/core/reshape/melt.py index e4be25b8448f8..7f5fb6b45f014 100644 --- a/pandas/core/reshape/melt.py +++ b/pandas/core/reshape/melt.py @@ -22,10 +22,7 @@ from pandas import DataFrame, Series # noqa: F401 -@Appender( - _shared_docs["melt"] - % dict(caller="pd.melt(df, ", other="DataFrame.melt") -) +@Appender(_shared_docs["melt"] % dict(caller="pd.melt(df, ", other="DataFrame.melt")) def melt( frame: "DataFrame", id_vars=None,