Skip to content

Commit 3f2b18a

Browse files
authored
DOC: Remove 1.0.0 versionadded/versionchanged (#51469)
* DOC: Remove 1.0.0 versionadded/versionchanged * Fix docstrings * Fix
1 parent 4f11580 commit 3f2b18a

34 files changed

+13
-189
lines changed

doc/source/development/policies.rst

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Policies
99
Version policy
1010
~~~~~~~~~~~~~~
1111

12-
.. versionchanged:: 1.0.0
13-
1412
pandas uses a loose variant of semantic versioning (`SemVer`_) to govern
1513
deprecations, API compatibility, and version numbering.
1614

doc/source/user_guide/boolean.rst

-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ Nullable Boolean data type
1717
BooleanArray is currently experimental. Its API or implementation may
1818
change without warning.
1919

20-
.. versionadded:: 1.0.0
21-
22-
2320
.. _boolean.indexing:
2421

2522
Indexing with NA values

doc/source/user_guide/indexing.rst

-13
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,6 @@ Selection by label
311311
312312
dfl.loc['20130102':'20130104']
313313
314-
.. warning::
315-
316-
.. versionchanged:: 1.0.0
317-
318-
pandas will raise a ``KeyError`` if indexing with a list with missing labels. See :ref:`list-like Using loc with
319-
missing keys in a list is Deprecated <indexing.deprecate_loc_reindex_listlike>`.
320-
321314
pandas provides a suite of methods in order to have **purely label based indexing**. This is a strict inclusion based protocol.
322315
Every label asked for must be in the index, or a ``KeyError`` will be raised.
323316
When slicing, both the start bound **AND** the stop bound are *included*, if present in the index.
@@ -622,12 +615,6 @@ For getting *multiple* indexers, using ``.get_indexer``:
622615
Indexing with list with missing labels is deprecated
623616
----------------------------------------------------
624617

625-
.. warning::
626-
627-
.. versionchanged:: 1.0.0
628-
629-
Using ``.loc`` or ``[]`` with a list with one or more missing labels will no longer reindex, in favor of ``.reindex``.
630-
631618
In prior versions, using ``.loc[list-of-labels]`` would work as long as *at least 1* of the keys was found (otherwise it
632619
would raise a ``KeyError``). This behavior was changed and will now raise a ``KeyError`` if at least one label is missing.
633620
The recommended alternative is to use ``.reindex()``.

doc/source/user_guide/integer_na.rst

+1-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ Nullable integer data type
1111
.. note::
1212

1313
IntegerArray is currently experimental. Its API or implementation may
14-
change without warning.
15-
16-
.. versionchanged:: 1.0.0
17-
18-
Now uses :attr:`pandas.NA` as the missing value rather
19-
than :attr:`numpy.nan`.
14+
change without warning. Uses :attr:`pandas.NA` as the missing value.
2015

2116
In :ref:`missing_data`, we saw that pandas primarily uses ``NaN`` to represent
2217
missing data. Because ``NaN`` is a float, this forces an array of integers with

doc/source/user_guide/io.rst

-9
Original file line numberDiff line numberDiff line change
@@ -3634,11 +3634,6 @@ It is often the case that users will insert columns to do temporary computations
36343634
in Excel and you may not want to read in those columns. ``read_excel`` takes
36353635
a ``usecols`` keyword to allow you to specify a subset of columns to parse.
36363636

3637-
.. versionchanged:: 1.0.0
3638-
3639-
Passing in an integer for ``usecols`` will no longer work. Please pass in a list
3640-
of ints from 0 to ``usecols`` inclusive instead.
3641-
36423637
You can specify a comma-delimited set of Excel columns and ranges as a string:
36433638

36443639
.. code-block:: python
@@ -3881,8 +3876,6 @@ Similarly, the :func:`~pandas.to_excel` method can write OpenDocument spreadshee
38813876
Binary Excel (.xlsb) files
38823877
--------------------------
38833878

3884-
.. versionadded:: 1.0.0
3885-
38863879
The :func:`~pandas.read_excel` method can also read binary Excel files
38873880
using the ``pyxlsb`` module. The semantics and features for reading
38883881
binary Excel files mostly match what can be done for `Excel files`_ using
@@ -5419,8 +5412,6 @@ The above example creates a partitioned dataset that may look like:
54195412
ORC
54205413
---
54215414

5422-
.. versionadded:: 1.0.0
5423-
54245415
Similar to the :ref:`parquet <io.parquet>` format, the `ORC Format <https://orc.apache.org/>`__ is a binary columnar serialization
54255416
for data frames. It is designed to make reading data frames efficient. pandas provides both the reader and the writer for the
54265417
ORC format, :func:`~pandas.read_orc` and :func:`~pandas.DataFrame.to_orc`. This requires the `pyarrow <https://arrow.apache.org/docs/python/>`__ library.

doc/source/user_guide/missing_data.rst

-2
Original file line numberDiff line numberDiff line change
@@ -753,8 +753,6 @@ Experimental ``NA`` scalar to denote missing values
753753

754754
Experimental: the behaviour of ``pd.NA`` can still change without warning.
755755

756-
.. versionadded:: 1.0.0
757-
758756
Starting from pandas 1.0, an experimental ``pd.NA`` value (singleton) is
759757
available to represent scalar missing values. At this moment, it is used in
760758
the nullable :doc:`integer <integer_na>`, boolean and

doc/source/user_guide/text.rst

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ Working with text data
1111
Text data types
1212
---------------
1313

14-
.. versionadded:: 1.0.0
15-
1614
There are two ways to store text data in pandas:
1715

1816
1. ``object`` -dtype NumPy array.

doc/source/user_guide/timeseries.rst

-2
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,6 @@ which can be specified. These are computed from the starting point specified by
335335
that was discussed :ref:`above<timeseries.converting.format>`). The
336336
available units are listed on the documentation for :func:`pandas.to_datetime`.
337337

338-
.. versionchanged:: 1.0.0
339-
340338
Constructing a :class:`Timestamp` or :class:`DatetimeIndex` with an epoch timestamp
341339
with the ``tz`` argument specified will raise a ValueError. If you have
342340
epochs in wall time in another timezone, you can read the epochs

doc/source/user_guide/visualization.rst

-2
Original file line numberDiff line numberDiff line change
@@ -1318,8 +1318,6 @@ with "(right)" in the legend. To turn off the automatic marking, use the
13181318
Custom formatters for timeseries plots
13191319
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13201320

1321-
.. versionchanged:: 1.0.0
1322-
13231321
pandas provides custom formatters for timeseries plots. These change the
13241322
formatting of the axis labels for dates and times. By default,
13251323
the custom formatters are applied only to plots created by pandas with

pandas/_libs/missing.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,6 @@ class NAType(C_NAType):
372372
373373
Experimental: the behaviour of NA can still change without warning.
374374
375-
.. versionadded:: 1.0.0
376-
377375
The NA singleton is a missing value indicator defined by pandas. It is
378376
used in certain new extension dtypes (currently the "string" dtype).
379377
"""

pandas/core/arrays/base.py

-2
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,6 @@ def to_numpy(
462462
"""
463463
Convert to a NumPy ndarray.
464464
465-
.. versionadded:: 1.0.0
466-
467465
This is similar to :meth:`numpy.asarray`, but may provide additional control
468466
over how the conversion is done.
469467

pandas/core/arrays/boolean.py

-4
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ class BooleanDtype(BaseMaskedDtype):
4343
"""
4444
Extension dtype for boolean data.
4545
46-
.. versionadded:: 1.0.0
47-
4846
.. warning::
4947
5048
BooleanDtype is considered experimental. The implementation and
@@ -246,8 +244,6 @@ class BooleanArray(BaseMaskedArray):
246244
:func:`pandas.array` specifying ``dtype="boolean"`` (see examples
247245
below).
248246
249-
.. versionadded:: 1.0.0
250-
251247
.. warning::
252248
253249
BooleanArray is considered experimental. The implementation and

pandas/core/arrays/categorical.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -1987,18 +1987,14 @@ def min(self, *, skipna: bool = True, **kwargs):
19871987
19881988
Only ordered `Categoricals` have a minimum!
19891989
1990-
.. versionchanged:: 1.0.0
1991-
1992-
Returns an NA value on empty arrays
1993-
19941990
Raises
19951991
------
19961992
TypeError
19971993
If the `Categorical` is not `ordered`.
19981994
19991995
Returns
20001996
-------
2001-
min : the minimum of this `Categorical`
1997+
min : the minimum of this `Categorical`, NA value if empty
20021998
"""
20031999
nv.validate_minmax_axis(kwargs.get("axis", 0))
20042000
nv.validate_min((), kwargs)
@@ -2023,18 +2019,14 @@ def max(self, *, skipna: bool = True, **kwargs):
20232019
20242020
Only ordered `Categoricals` have a maximum!
20252021
2026-
.. versionchanged:: 1.0.0
2027-
2028-
Returns an NA value on empty arrays
2029-
20302022
Raises
20312023
------
20322024
TypeError
20332025
If the `Categorical` is not `ordered`.
20342026
20352027
Returns
20362028
-------
2037-
max : the maximum of this `Categorical`
2029+
max : the maximum of this `Categorical`, NA if array is empty
20382030
"""
20392031
nv.validate_minmax_axis(kwargs.get("axis", 0))
20402032
nv.validate_max((), kwargs)

pandas/core/arrays/integer.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class IntegerDtype(NumericDtype):
1616
An ExtensionDtype to hold a single size & kind of integer dtype.
1717
1818
These specific implementations are subclasses of the non-public
19-
IntegerDtype. For example we have Int8Dtype to represent signed int 8s.
19+
IntegerDtype. For example, we have Int8Dtype to represent signed int 8s.
2020
2121
The attributes name & type are set when these subclasses are created.
2222
"""
@@ -63,10 +63,7 @@ class IntegerArray(NumericArray):
6363
"""
6464
Array of integer (optional missing) values.
6565
66-
.. versionchanged:: 1.0.0
67-
68-
Now uses :attr:`pandas.NA` as the missing value rather
69-
than :attr:`numpy.nan`.
66+
Uses :attr:`pandas.NA` as the missing value.
7067
7168
.. warning::
7269
@@ -141,10 +138,7 @@ class IntegerArray(NumericArray):
141138
_dtype_docstring = """
142139
An ExtensionDtype for {dtype} integer data.
143140
144-
.. versionchanged:: 1.0.0
145-
146-
Now uses :attr:`pandas.NA` as its missing value,
147-
rather than :attr:`numpy.nan`.
141+
Uses :attr:`pandas.NA` as its missing value, rather than :attr:`numpy.nan`.
148142
149143
Attributes
150144
----------

pandas/core/arrays/string_.py

-4
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ class StringDtype(StorageExtensionDtype):
7070
"""
7171
Extension dtype for string data.
7272
73-
.. versionadded:: 1.0.0
74-
7573
.. warning::
7674
7775
StringDtype is considered experimental. The implementation and
@@ -233,8 +231,6 @@ class StringArray(BaseStringArray, PandasArray):
233231
"""
234232
Extension array for string data.
235233
236-
.. versionadded:: 1.0.0
237-
238234
.. warning::
239235
240236
StringArray is considered experimental. The implementation and

pandas/core/base.py

-5
Original file line numberDiff line numberDiff line change
@@ -496,15 +496,10 @@ def to_numpy(
496496
na_value : Any, optional
497497
The value to use for missing values. The default value depends
498498
on `dtype` and the type of the array.
499-
500-
.. versionadded:: 1.0.0
501-
502499
**kwargs
503500
Additional keywords passed through to the ``to_numpy`` method
504501
of the underlying array (for extension arrays).
505502
506-
.. versionadded:: 1.0.0
507-
508503
Returns
509504
-------
510505
numpy.ndarray

pandas/core/construction.py

-6
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,6 @@ def array(
128128
129129
For all other cases, NumPy's usual inference rules will be used.
130130
131-
.. versionchanged:: 1.0.0
132-
133-
Pandas infers nullable-integer dtype for integer data,
134-
string dtype for string data, and nullable-boolean dtype
135-
for boolean data.
136-
137131
.. versionchanged:: 1.2.0
138132
139133
Pandas now also infers nullable-floating dtype for float-like

pandas/core/frame.py

+2-24
Original file line numberDiff line numberDiff line change
@@ -1223,12 +1223,8 @@ def to_string(
12231223
(when number of rows is above `max_rows`).
12241224
max_colwidth : int, optional
12251225
Max width to truncate each column in characters. By default, no limit.
1226-
1227-
.. versionadded:: 1.0.0
12281226
encoding : str, default "utf-8"
12291227
Set character encoding.
1230-
1231-
.. versionadded:: 1.0
12321228
%(returns)s
12331229
See Also
12341230
--------
@@ -2541,10 +2537,6 @@ def to_stata(
25412537
String, path object (implementing ``os.PathLike[str]``), or file-like
25422538
object implementing a binary ``write()`` function.
25432539
2544-
.. versionchanged:: 1.0.0
2545-
2546-
Previously this was "fname"
2547-
25482540
convert_dates : dict
25492541
Dictionary mapping columns containing datetime types to stata
25502542
internal format to use when writing the dates. Options are 'tc',
@@ -2581,10 +2573,6 @@ def to_stata(
25812573
smaller datasets in format 119 may have unintended consequences,
25822574
and, as of November 2020, Stata SE cannot read version 119 files.
25832575
2584-
.. versionchanged:: 1.0.0
2585-
2586-
Added support for formats 118 and 119.
2587-
25882576
convert_strl : list, optional
25892577
List of column names to convert to string columns to Stata StrL
25902578
format. Only available if version is 117. Storing strings in the
@@ -4304,9 +4292,6 @@ def query(self, expr: str, *, inplace: bool = False, **kwargs) -> DataFrame | No
43044292
For example, if one of your columns is called ``a a`` and you want
43054293
to sum it with ``b``, your query should be ```a a` + b``.
43064294
4307-
.. versionadded:: 1.0.0
4308-
Expanding functionality of backtick quoting for more than only spaces.
4309-
43104295
inplace : bool
43114296
Whether to modify the DataFrame rather than creating a new one.
43124297
**kwargs
@@ -6283,10 +6268,8 @@ def dropna(
62836268
* 0, or 'index' : Drop rows which contain missing values.
62846269
* 1, or 'columns' : Drop columns which contain missing value.
62856270
6286-
.. versionchanged:: 1.0.0
6287-
6288-
Pass tuple or list to drop on multiple axes.
6289-
Only a single axis is allowed.
6271+
Pass tuple or list to drop on multiple axes.
6272+
Only a single axis is allowed.
62906273
62916274
how : {'any', 'all'}, default 'any'
62926275
Determine if row or column is removed from DataFrame, when we have
@@ -6452,8 +6435,6 @@ def drop_duplicates(
64526435
ignore_index : bool, default ``False``
64536436
If ``True``, the resulting axis will be labeled 0, 1, …, n - 1.
64546437
6455-
.. versionadded:: 1.0.0
6456-
64576438
Returns
64586439
-------
64596440
DataFrame or None
@@ -6879,9 +6860,6 @@ def sort_index(
68796860
levels too (in order) after sorting by specified level.
68806861
ignore_index : bool, default False
68816862
If True, the resulting axis will be labeled 0, 1, …, n - 1.
6882-
6883-
.. versionadded:: 1.0.0
6884-
68856863
key : callable, optional
68866864
If not None, apply the key function to the index values
68876865
before sorting. This is similar to the `key` argument in the

0 commit comments

Comments
 (0)