Skip to content

DOC/CLN: remove versionadded/changed:: 0.21 #33301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/source/development/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ the ``pandas.util._decorators.deprecate``:

from pandas.util._decorators import deprecate

deprecate('old_func', 'new_func', '0.21.0')
deprecate('old_func', 'new_func', '1.1.0')

Otherwise, you need to do it manually:

Expand All @@ -803,7 +803,7 @@ Otherwise, you need to do it manually:
def old_func():
"""Summary of the function.

.. deprecated:: 0.21.0
.. deprecated:: 1.1.0
Use new_func instead.
"""
warnings.warn('Use new_func instead.', FutureWarning, stacklevel=2)
Expand Down Expand Up @@ -1354,9 +1354,9 @@ directive is used. The sphinx syntax for that is:

.. code-block:: rst

.. versionadded:: 0.21.0
.. versionadded:: 1.1.0

This will put the text *New in version 0.21.0* wherever you put the sphinx
This will put the text *New in version 1.1.0* wherever you put the sphinx
directive. This should also be put in the docstring when adding a new function
or method (`example <https://github.com/pandas-dev/pandas/blob/v0.20.2/pandas/core/frame.py#L1495>`__)
or a new keyword argument (`example <https://github.com/pandas-dev/pandas/blob/v0.20.2/pandas/core/generic.py#L568>`__).
Expand Down
4 changes: 0 additions & 4 deletions doc/source/user_guide/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1224,8 +1224,6 @@ following can be done:
This means that the reindexed Series's index is the same Python object as the
DataFrame's index.

.. versionadded:: 0.21.0

:meth:`DataFrame.reindex` also supports an "axis-style" calling convention,
where you specify a single ``labels`` argument and the ``axis`` it applies to.

Expand Down Expand Up @@ -1435,8 +1433,6 @@ Series can also be used:
If the mapping doesn't include a column/index label, it isn't renamed. Note that
extra labels in the mapping don't throw an error.

.. versionadded:: 0.21.0

:meth:`DataFrame.rename` also supports an "axis-style" calling convention, where
you specify a single ``mapper`` and the ``axis`` to apply that mapping to.

Expand Down
2 changes: 0 additions & 2 deletions doc/source/user_guide/categorical.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ To get back to the original ``Series`` or NumPy array, use
CategoricalDtype
----------------

.. versionchanged:: 0.21.0

A categorical's type is fully described by

1. ``categories``: a sequence of unique values and no missing values
Expand Down
2 changes: 0 additions & 2 deletions doc/source/user_guide/groupby.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1327,8 +1327,6 @@ See the :ref:`visualization documentation<visualization.box>` for more.
Piping function calls
~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 0.21.0

Similar to the functionality provided by ``DataFrame`` and ``Series``, functions
that take ``GroupBy`` objects can be chained together using a ``pipe`` method to
allow for a cleaner, more readable syntax. To read about ``.pipe`` in general terms,
Expand Down
6 changes: 0 additions & 6 deletions doc/source/user_guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,6 @@ specification:

pd.read_csv(StringIO(data), dtype={'col1': 'category'}).dtypes

.. versionadded:: 0.21.0

Specifying ``dtype='category'`` will result in an unordered ``Categorical``
whose ``categories`` are the unique values observed in the data. For more
control on the categories and order, create a
Expand Down Expand Up @@ -2171,8 +2169,6 @@ Line delimited json
pandas is able to read and write line-delimited json files that are common in data processing pipelines
using Hadoop or Spark.

.. versionadded:: 0.21.0

For line-delimited json files, pandas can also return an iterator which reads in ``chunksize`` lines at a time. This can be useful for large files or to read from a stream.

.. ipython:: python
Expand Down Expand Up @@ -4646,8 +4642,6 @@ Read from a feather file.
Parquet
-------

.. versionadded:: 0.21.0

`Apache Parquet <https://parquet.apache.org/>`__ provides a partitioned binary columnar serialization for data frames. It is designed to
make reading and writing data frames efficient, and to make sharing data across data analysis
languages easy. Parquet can use a variety of compression techniques to shrink the file size as much as possible
Expand Down
4 changes: 0 additions & 4 deletions doc/source/user_guide/merging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,6 @@ all standard database join operations between ``DataFrame`` or named ``Series``
dataset.
* "many_to_many" or "m:m": allowed, but does not result in checks.

.. versionadded:: 0.21.0

.. note::

Support for specifying index levels as the ``on``, ``left_on``, and
Expand Down Expand Up @@ -773,8 +771,6 @@ Here is another example with duplicate join keys in DataFrames:
Checking for duplicate keys
~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 0.21.0

Users can use the ``validate`` argument to automatically check whether there
are unexpected duplicates in their merge keys. Key uniqueness is checked before
merge operations and so should protect against memory overflows. Checking key
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/lib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1197,8 +1197,6 @@ def infer_dtype(value: object, skipna: bool = True) -> str:
skipna : bool, default True
Ignore NaN values when inferring the type.

.. versionadded:: 0.21.0

Returns
-------
str
Expand Down
7 changes: 0 additions & 7 deletions pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ class Categorical(ExtensionArray, PandasObject):
dtype : CategoricalDtype
An instance of ``CategoricalDtype`` to use for this categorical.

.. versionadded:: 0.21.0

Attributes
----------
categories : Index
Expand All @@ -257,8 +255,6 @@ class Categorical(ExtensionArray, PandasObject):
The instance of ``CategoricalDtype`` storing the ``categories``
and ``ordered``.

.. versionadded:: 0.21.0

Methods
-------
from_codes
Expand Down Expand Up @@ -876,8 +872,6 @@ def rename_categories(self, new_categories, inplace=False):
are passed through and extra categories in the mapping are
ignored.

.. versionadded:: 0.21.0.

* callable : a callable that is called on all items in the old
categories and whose return values comprise the new categories.

Expand Down Expand Up @@ -1306,7 +1300,6 @@ def __setstate__(self, state):
if not isinstance(state, dict):
raise Exception("invalid pickle state")

# compat with pre 0.21.0 CategoricalDtype change
if "_dtype" not in state:
state["_dtype"] = CategoricalDtype(state["_categories"], state["_ordered"])

Expand Down
2 changes: 0 additions & 2 deletions pandas/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,6 @@ def standardize_mapping(into):
"""
Helper function to standardize a supplied mapping.

.. versionadded:: 0.21.0

Parameters
----------
into : instance or subclass of collections.abc.Mapping
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/dtypes/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ class CategoricalDtype(PandasExtensionDtype, ExtensionDtype):
"""
Type for categorical data with the categories and orderedness.

.. versionchanged:: 0.21.0

Parameters
----------
categories : sequence, optional
Expand Down
10 changes: 0 additions & 10 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@
dataset.
* "many_to_many" or "m:m": allowed, but does not result in checks.

.. versionadded:: 0.21.0

Returns
-------
DataFrame
Expand Down Expand Up @@ -1339,8 +1337,6 @@ def to_dict(self, orient="dict", into=dict):
instance of the mapping type you want. If you want a
collections.defaultdict, you must pass it initialized.

.. versionadded:: 0.21.0

Returns
-------
dict, list or collections.abc.Mapping
Expand Down Expand Up @@ -2118,8 +2114,6 @@ def to_parquet(
"""
Write a DataFrame to the binary parquet format.

.. versionadded:: 0.21.0

This function writes the dataframe as a `parquet file
<https://parquet.apache.org/>`_. You can choose different parquet
backends, and have the option of compression. See
Expand Down Expand Up @@ -3749,13 +3743,9 @@ def drop(
index : single label or list-like
Alternative to specifying axis (``labels, axis=0``
is equivalent to ``index=labels``).

.. versionadded:: 0.21.0
columns : single label or list-like
Alternative to specifying axis (``labels, axis=1``
is equivalent to ``columns=labels``).

.. versionadded:: 0.21.0
level : int or level name, optional
For MultiIndex, level from which the labels will be removed.
inplace : bool, default False
Expand Down
19 changes: 0 additions & 19 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,13 +526,6 @@ def set_axis(self, labels, axis: Axis = 0, inplace: bool = False):
Indexes for%(extended_summary_sub)s row labels can be changed by assigning
a list-like or Index.

.. versionchanged:: 0.21.0

The signature is now `labels` and `axis`, consistent with
the rest of pandas API. Previously, the `axis` and `labels`
arguments were respectively the first and second positional
arguments.

Parameters
----------
labels : list-like, Index
Expand Down Expand Up @@ -1178,8 +1171,6 @@ def _set_axis_name(self, name, axis=0, inplace=False):
inplace : bool, default False
If `True`, do operation inplace and return None.

.. versionadded:: 0.21.0

Returns
-------
Series, DataFrame, or None
Expand Down Expand Up @@ -2146,7 +2137,6 @@ def to_json(
only used when the first argument is a filename. By default, the
compression is inferred from the filename.

.. versionadded:: 0.21.0
.. versionchanged:: 0.24.0
'infer' option added and set to default
index : bool, default True
Expand Down Expand Up @@ -2663,7 +2653,6 @@ def to_pickle(
parameter is equivalent to setting its value to HIGHEST_PROTOCOL.

.. [1] https://docs.python.org/3/library/pickle.html.
.. versionadded:: 0.21.0.

See Also
--------
Expand Down Expand Up @@ -3794,8 +3783,6 @@ def reindex_like(
the same size as the index and its dtype must exactly match the
index's type.

.. versionadded:: 0.21.0 (list-like tolerance)

Returns
-------
Series or DataFrame
Expand Down Expand Up @@ -4235,8 +4222,6 @@ def reindex(self: FrameOrSeries, *args, **kwargs) -> FrameOrSeries:
the same size as the index and its dtype must exactly match the
index's type.

.. versionadded:: 0.21.0 (list-like tolerance)

Returns
-------
%(klass)s with changed index.
Expand Down Expand Up @@ -5750,8 +5735,6 @@ def infer_objects(self: FrameOrSeries) -> FrameOrSeries:
columns unchanged. The inference rules are the
same as during normal Series/DataFrame construction.

.. versionadded:: 0.21.0

Returns
-------
converted : same type as input object
Expand Down Expand Up @@ -7287,8 +7270,6 @@ def clip(
Align object with lower and upper along the given axis.
inplace : bool, default False
Whether to perform the operation in place on the data.

.. versionadded:: 0.21.0
*args, **kwargs
Additional keywords have no effect but might be accepted
for compatibility with numpy.
Expand Down
4 changes: 0 additions & 4 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2836,8 +2836,6 @@ def get_loc(self, key, method=None, tolerance=None):
the index at the matching location most satisfy the equation
``abs(index[loc] - key) <= tolerance``.

.. versionadded:: 0.21.0 (list-like tolerance)

Returns
-------
loc : int if unique index, slice if monotonic index, else mask
Expand Down Expand Up @@ -2909,8 +2907,6 @@ def get_loc(self, key, method=None, tolerance=None):
the same size as the index and its dtype must exactly match the
index's type.

.. versionadded:: 0.21.0 (list-like tolerance)

Returns
-------
indexer : ndarray of int
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/indexes/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ class CategoricalIndex(ExtensionIndex, accessor.PandasDelegate):
dtype : CategoricalDtype or "category", optional
If :class:`CategoricalDtype`, cannot be used together with
`categories` or `ordered`.

.. versionadded:: 0.21.0
copy : bool, default False
Make a copy of input ndarray.
name : object, optional
Expand Down
6 changes: 0 additions & 6 deletions pandas/core/indexes/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,16 +1014,10 @@ def bdate_range(
Weekmask of valid business days, passed to ``numpy.busdaycalendar``,
only used when custom frequency strings are passed. The default
value None is equivalent to 'Mon Tue Wed Thu Fri'.

.. versionadded:: 0.21.0

holidays : list-like or None, default None
Dates to exclude from the set of valid business days, passed to
``numpy.busdaycalendar``, only used when custom frequency strings
are passed.

.. versionadded:: 0.21.0

closed : str, default None
Make the interval closed with respect to the given frequency to
the 'left', 'right', or both sides (None).
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,6 @@ def nearest(self, limit=None):
limit : int, optional
Limit of how many values to fill.

.. versionadded:: 0.21.0

Returns
-------
Series or DataFrame
Expand Down
3 changes: 0 additions & 3 deletions pandas/core/reshape/pivot.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,6 @@ def crosstab(
margins_name : str, default 'All'
Name of the row/column that will contain the totals
when margins is True.

.. versionadded:: 0.21.0

dropna : bool, default True
Do not include columns whose entries are all NaN.
normalize : bool, {'all', 'index', 'columns'}, or {0,1}, default False
Expand Down
6 changes: 0 additions & 6 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1509,8 +1509,6 @@ def to_dict(self, into=dict):
instance of the mapping type you want. If you want a
collections.defaultdict, you must pass it initialized.

.. versionadded:: 0.21.0

Returns
-------
collections.abc.Mapping
Expand Down Expand Up @@ -4067,12 +4065,8 @@ def drop(
index : single label or list-like
Redundant for application on Series, but 'index' can be used instead
of 'labels'.

.. versionadded:: 0.21.0
columns : single label or list-like
No change is made to the Series; use 'index' or 'labels' instead.

.. versionadded:: 0.21.0
level : int or level name, optional
For MultiIndex, level for which the labels will be removed.
inplace : bool, default False
Expand Down
2 changes: 0 additions & 2 deletions pandas/io/formats/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,6 @@ def where(
Updates the HTML representation with a style which is
selected in accordance with the return value of a function.

.. versionadded:: 0.21.0

Parameters
----------
cond : callable
Expand Down
2 changes: 0 additions & 2 deletions pandas/io/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,8 +1057,6 @@ def read_html(
the header, otherwise the function attempts to find the header within
the body (by putting rows with only ``<th>`` elements into the header).

.. versionadded:: 0.21.0

Similar to :func:`~read_csv` the `header` argument is applied
**after** `skiprows` is applied.

Expand Down
Loading