Skip to content

Commit 7113911

Browse files
simonjayhawkinsjbrockmendel
authored andcommitted
DOC/CLN: remove versionadded/changed:: 0.21 (pandas-dev#33301)
1 parent 5550f27 commit 7113911

24 files changed

+4
-106
lines changed

doc/source/development/contributing.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ the ``pandas.util._decorators.deprecate``:
791791
792792
from pandas.util._decorators import deprecate
793793
794-
deprecate('old_func', 'new_func', '0.21.0')
794+
deprecate('old_func', 'new_func', '1.1.0')
795795
796796
Otherwise, you need to do it manually:
797797

@@ -803,7 +803,7 @@ Otherwise, you need to do it manually:
803803
def old_func():
804804
"""Summary of the function.
805805
806-
.. deprecated:: 0.21.0
806+
.. deprecated:: 1.1.0
807807
Use new_func instead.
808808
"""
809809
warnings.warn('Use new_func instead.', FutureWarning, stacklevel=2)
@@ -1354,9 +1354,9 @@ directive is used. The sphinx syntax for that is:
13541354

13551355
.. code-block:: rst
13561356
1357-
.. versionadded:: 0.21.0
1357+
.. versionadded:: 1.1.0
13581358
1359-
This will put the text *New in version 0.21.0* wherever you put the sphinx
1359+
This will put the text *New in version 1.1.0* wherever you put the sphinx
13601360
directive. This should also be put in the docstring when adding a new function
13611361
or method (`example <https://github.com/pandas-dev/pandas/blob/v0.20.2/pandas/core/frame.py#L1495>`__)
13621362
or a new keyword argument (`example <https://github.com/pandas-dev/pandas/blob/v0.20.2/pandas/core/generic.py#L568>`__).

doc/source/user_guide/basics.rst

-4
Original file line numberDiff line numberDiff line change
@@ -1224,8 +1224,6 @@ following can be done:
12241224
This means that the reindexed Series's index is the same Python object as the
12251225
DataFrame's index.
12261226

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

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

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

doc/source/user_guide/categorical.rst

-2
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,6 @@ To get back to the original ``Series`` or NumPy array, use
211211
CategoricalDtype
212212
----------------
213213

214-
.. versionchanged:: 0.21.0
215-
216214
A categorical's type is fully described by
217215

218216
1. ``categories``: a sequence of unique values and no missing values

doc/source/user_guide/groupby.rst

-2
Original file line numberDiff line numberDiff line change
@@ -1327,8 +1327,6 @@ See the :ref:`visualization documentation<visualization.box>` for more.
13271327
Piping function calls
13281328
~~~~~~~~~~~~~~~~~~~~~
13291329

1330-
.. versionadded:: 0.21.0
1331-
13321330
Similar to the functionality provided by ``DataFrame`` and ``Series``, functions
13331331
that take ``GroupBy`` objects can be chained together using a ``pipe`` method to
13341332
allow for a cleaner, more readable syntax. To read about ``.pipe`` in general terms,

doc/source/user_guide/io.rst

-6
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,6 @@ specification:
461461
462462
pd.read_csv(StringIO(data), dtype={'col1': 'category'}).dtypes
463463
464-
.. versionadded:: 0.21.0
465-
466464
Specifying ``dtype='category'`` will result in an unordered ``Categorical``
467465
whose ``categories`` are the unique values observed in the data. For more
468466
control on the categories and order, create a
@@ -2171,8 +2169,6 @@ Line delimited json
21712169
pandas is able to read and write line-delimited json files that are common in data processing pipelines
21722170
using Hadoop or Spark.
21732171

2174-
.. versionadded:: 0.21.0
2175-
21762172
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.
21772173

21782174
.. ipython:: python
@@ -4646,8 +4642,6 @@ Read from a feather file.
46464642
Parquet
46474643
-------
46484644

4649-
.. versionadded:: 0.21.0
4650-
46514645
`Apache Parquet <https://parquet.apache.org/>`__ provides a partitioned binary columnar serialization for data frames. It is designed to
46524646
make reading and writing data frames efficient, and to make sharing data across data analysis
46534647
languages easy. Parquet can use a variety of compression techniques to shrink the file size as much as possible

doc/source/user_guide/merging.rst

-4
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,6 @@ all standard database join operations between ``DataFrame`` or named ``Series``
573573
dataset.
574574
* "many_to_many" or "m:m": allowed, but does not result in checks.
575575

576-
.. versionadded:: 0.21.0
577-
578576
.. note::
579577

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

776-
.. versionadded:: 0.21.0
777-
778774
Users can use the ``validate`` argument to automatically check whether there
779775
are unexpected duplicates in their merge keys. Key uniqueness is checked before
780776
merge operations and so should protect against memory overflows. Checking key

pandas/_libs/lib.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1197,8 +1197,6 @@ def infer_dtype(value: object, skipna: bool = True) -> str:
11971197
skipna : bool, default True
11981198
Ignore NaN values when inferring the type.
11991199

1200-
.. versionadded:: 0.21.0
1201-
12021200
Returns
12031201
-------
12041202
str

pandas/core/arrays/categorical.py

-7
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,6 @@ class Categorical(ExtensionArray, PandasObject):
242242
dtype : CategoricalDtype
243243
An instance of ``CategoricalDtype`` to use for this categorical.
244244
245-
.. versionadded:: 0.21.0
246-
247245
Attributes
248246
----------
249247
categories : Index
@@ -257,8 +255,6 @@ class Categorical(ExtensionArray, PandasObject):
257255
The instance of ``CategoricalDtype`` storing the ``categories``
258256
and ``ordered``.
259257
260-
.. versionadded:: 0.21.0
261-
262258
Methods
263259
-------
264260
from_codes
@@ -876,8 +872,6 @@ def rename_categories(self, new_categories, inplace=False):
876872
are passed through and extra categories in the mapping are
877873
ignored.
878874
879-
.. versionadded:: 0.21.0.
880-
881875
* callable : a callable that is called on all items in the old
882876
categories and whose return values comprise the new categories.
883877
@@ -1306,7 +1300,6 @@ def __setstate__(self, state):
13061300
if not isinstance(state, dict):
13071301
raise Exception("invalid pickle state")
13081302

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

pandas/core/common.py

-2
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,6 @@ def standardize_mapping(into):
357357
"""
358358
Helper function to standardize a supplied mapping.
359359
360-
.. versionadded:: 0.21.0
361-
362360
Parameters
363361
----------
364362
into : instance or subclass of collections.abc.Mapping

pandas/core/dtypes/dtypes.py

-2
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,6 @@ class CategoricalDtype(PandasExtensionDtype, ExtensionDtype):
189189
"""
190190
Type for categorical data with the categories and orderedness.
191191
192-
.. versionchanged:: 0.21.0
193-
194192
Parameters
195193
----------
196194
categories : sequence, optional

pandas/core/frame.py

-10
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@
245245
dataset.
246246
* "many_to_many" or "m:m": allowed, but does not result in checks.
247247
248-
.. versionadded:: 0.21.0
249-
250248
Returns
251249
-------
252250
DataFrame
@@ -1339,8 +1337,6 @@ def to_dict(self, orient="dict", into=dict):
13391337
instance of the mapping type you want. If you want a
13401338
collections.defaultdict, you must pass it initialized.
13411339
1342-
.. versionadded:: 0.21.0
1343-
13441340
Returns
13451341
-------
13461342
dict, list or collections.abc.Mapping
@@ -2118,8 +2114,6 @@ def to_parquet(
21182114
"""
21192115
Write a DataFrame to the binary parquet format.
21202116
2121-
.. versionadded:: 0.21.0
2122-
21232117
This function writes the dataframe as a `parquet file
21242118
<https://parquet.apache.org/>`_. You can choose different parquet
21252119
backends, and have the option of compression. See
@@ -3749,13 +3743,9 @@ def drop(
37493743
index : single label or list-like
37503744
Alternative to specifying axis (``labels, axis=0``
37513745
is equivalent to ``index=labels``).
3752-
3753-
.. versionadded:: 0.21.0
37543746
columns : single label or list-like
37553747
Alternative to specifying axis (``labels, axis=1``
37563748
is equivalent to ``columns=labels``).
3757-
3758-
.. versionadded:: 0.21.0
37593749
level : int or level name, optional
37603750
For MultiIndex, level from which the labels will be removed.
37613751
inplace : bool, default False

pandas/core/generic.py

-19
Original file line numberDiff line numberDiff line change
@@ -526,13 +526,6 @@ def set_axis(self, labels, axis: Axis = 0, inplace: bool = False):
526526
Indexes for%(extended_summary_sub)s row labels can be changed by assigning
527527
a list-like or Index.
528528
529-
.. versionchanged:: 0.21.0
530-
531-
The signature is now `labels` and `axis`, consistent with
532-
the rest of pandas API. Previously, the `axis` and `labels`
533-
arguments were respectively the first and second positional
534-
arguments.
535-
536529
Parameters
537530
----------
538531
labels : list-like, Index
@@ -1178,8 +1171,6 @@ def _set_axis_name(self, name, axis=0, inplace=False):
11781171
inplace : bool, default False
11791172
If `True`, do operation inplace and return None.
11801173
1181-
.. versionadded:: 0.21.0
1182-
11831174
Returns
11841175
-------
11851176
Series, DataFrame, or None
@@ -2146,7 +2137,6 @@ def to_json(
21462137
only used when the first argument is a filename. By default, the
21472138
compression is inferred from the filename.
21482139
2149-
.. versionadded:: 0.21.0
21502140
.. versionchanged:: 0.24.0
21512141
'infer' option added and set to default
21522142
index : bool, default True
@@ -2663,7 +2653,6 @@ def to_pickle(
26632653
parameter is equivalent to setting its value to HIGHEST_PROTOCOL.
26642654
26652655
.. [1] https://docs.python.org/3/library/pickle.html.
2666-
.. versionadded:: 0.21.0.
26672656
26682657
See Also
26692658
--------
@@ -3794,8 +3783,6 @@ def reindex_like(
37943783
the same size as the index and its dtype must exactly match the
37953784
index's type.
37963785
3797-
.. versionadded:: 0.21.0 (list-like tolerance)
3798-
37993786
Returns
38003787
-------
38013788
Series or DataFrame
@@ -4235,8 +4222,6 @@ def reindex(self: FrameOrSeries, *args, **kwargs) -> FrameOrSeries:
42354222
the same size as the index and its dtype must exactly match the
42364223
index's type.
42374224
4238-
.. versionadded:: 0.21.0 (list-like tolerance)
4239-
42404225
Returns
42414226
-------
42424227
%(klass)s with changed index.
@@ -5750,8 +5735,6 @@ def infer_objects(self: FrameOrSeries) -> FrameOrSeries:
57505735
columns unchanged. The inference rules are the
57515736
same as during normal Series/DataFrame construction.
57525737
5753-
.. versionadded:: 0.21.0
5754-
57555738
Returns
57565739
-------
57575740
converted : same type as input object
@@ -7287,8 +7270,6 @@ def clip(
72877270
Align object with lower and upper along the given axis.
72887271
inplace : bool, default False
72897272
Whether to perform the operation in place on the data.
7290-
7291-
.. versionadded:: 0.21.0
72927273
*args, **kwargs
72937274
Additional keywords have no effect but might be accepted
72947275
for compatibility with numpy.

pandas/core/indexes/base.py

-4
Original file line numberDiff line numberDiff line change
@@ -2836,8 +2836,6 @@ def get_loc(self, key, method=None, tolerance=None):
28362836
the index at the matching location most satisfy the equation
28372837
``abs(index[loc] - key) <= tolerance``.
28382838
2839-
.. versionadded:: 0.21.0 (list-like tolerance)
2840-
28412839
Returns
28422840
-------
28432841
loc : int if unique index, slice if monotonic index, else mask
@@ -2909,8 +2907,6 @@ def get_loc(self, key, method=None, tolerance=None):
29092907
the same size as the index and its dtype must exactly match the
29102908
index's type.
29112909
2912-
.. versionadded:: 0.21.0 (list-like tolerance)
2913-
29142910
Returns
29152911
-------
29162912
indexer : ndarray of int

pandas/core/indexes/category.py

-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ class CategoricalIndex(ExtensionIndex, accessor.PandasDelegate):
9191
dtype : CategoricalDtype or "category", optional
9292
If :class:`CategoricalDtype`, cannot be used together with
9393
`categories` or `ordered`.
94-
95-
.. versionadded:: 0.21.0
9694
copy : bool, default False
9795
Make a copy of input ndarray.
9896
name : object, optional

pandas/core/indexes/datetimes.py

-6
Original file line numberDiff line numberDiff line change
@@ -1014,16 +1014,10 @@ def bdate_range(
10141014
Weekmask of valid business days, passed to ``numpy.busdaycalendar``,
10151015
only used when custom frequency strings are passed. The default
10161016
value None is equivalent to 'Mon Tue Wed Thu Fri'.
1017-
1018-
.. versionadded:: 0.21.0
1019-
10201017
holidays : list-like or None, default None
10211018
Dates to exclude from the set of valid business days, passed to
10221019
``numpy.busdaycalendar``, only used when custom frequency strings
10231020
are passed.
1024-
1025-
.. versionadded:: 0.21.0
1026-
10271021
closed : str, default None
10281022
Make the interval closed with respect to the given frequency to
10291023
the 'left', 'right', or both sides (None).

pandas/core/resample.py

-2
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,6 @@ def nearest(self, limit=None):
467467
limit : int, optional
468468
Limit of how many values to fill.
469469
470-
.. versionadded:: 0.21.0
471-
472470
Returns
473471
-------
474472
Series or DataFrame

pandas/core/reshape/pivot.py

-3
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,6 @@ def crosstab(
500500
margins_name : str, default 'All'
501501
Name of the row/column that will contain the totals
502502
when margins is True.
503-
504-
.. versionadded:: 0.21.0
505-
506503
dropna : bool, default True
507504
Do not include columns whose entries are all NaN.
508505
normalize : bool, {'all', 'index', 'columns'}, or {0,1}, default False

pandas/core/series.py

-6
Original file line numberDiff line numberDiff line change
@@ -1509,8 +1509,6 @@ def to_dict(self, into=dict):
15091509
instance of the mapping type you want. If you want a
15101510
collections.defaultdict, you must pass it initialized.
15111511
1512-
.. versionadded:: 0.21.0
1513-
15141512
Returns
15151513
-------
15161514
collections.abc.Mapping
@@ -4067,12 +4065,8 @@ def drop(
40674065
index : single label or list-like
40684066
Redundant for application on Series, but 'index' can be used instead
40694067
of 'labels'.
4070-
4071-
.. versionadded:: 0.21.0
40724068
columns : single label or list-like
40734069
No change is made to the Series; use 'index' or 'labels' instead.
4074-
4075-
.. versionadded:: 0.21.0
40764070
level : int or level name, optional
40774071
For MultiIndex, level for which the labels will be removed.
40784072
inplace : bool, default False

pandas/io/formats/style.py

-2
Original file line numberDiff line numberDiff line change
@@ -765,8 +765,6 @@ def where(
765765
Updates the HTML representation with a style which is
766766
selected in accordance with the return value of a function.
767767
768-
.. versionadded:: 0.21.0
769-
770768
Parameters
771769
----------
772770
cond : callable

pandas/io/html.py

-2
Original file line numberDiff line numberDiff line change
@@ -1057,8 +1057,6 @@ def read_html(
10571057
the header, otherwise the function attempts to find the header within
10581058
the body (by putting rows with only ``<th>`` elements into the header).
10591059
1060-
.. versionadded:: 0.21.0
1061-
10621060
Similar to :func:`~read_csv` the `header` argument is applied
10631061
**after** `skiprows` is applied.
10641062

0 commit comments

Comments
 (0)