Skip to content

Commit

Permalink
DOC: Remove 1.0.0 versionadded/versionchanged (#51469)
Browse files Browse the repository at this point in the history
* DOC: Remove 1.0.0 versionadded/versionchanged

* Fix docstrings

* Fix
  • Loading branch information
phofl committed Feb 22, 2023
1 parent 4f11580 commit 3f2b18a
Show file tree
Hide file tree
Showing 34 changed files with 13 additions and 189 deletions.
2 changes: 0 additions & 2 deletions doc/source/development/policies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Policies
Version policy
~~~~~~~~~~~~~~

.. versionchanged:: 1.0.0

pandas uses a loose variant of semantic versioning (`SemVer`_) to govern
deprecations, API compatibility, and version numbering.

Expand Down
3 changes: 0 additions & 3 deletions doc/source/user_guide/boolean.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ Nullable Boolean data type
BooleanArray is currently experimental. Its API or implementation may
change without warning.

.. versionadded:: 1.0.0


.. _boolean.indexing:

Indexing with NA values
Expand Down
13 changes: 0 additions & 13 deletions doc/source/user_guide/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,6 @@ Selection by label
dfl.loc['20130102':'20130104']
.. warning::

.. versionchanged:: 1.0.0

pandas will raise a ``KeyError`` if indexing with a list with missing labels. See :ref:`list-like Using loc with
missing keys in a list is Deprecated <indexing.deprecate_loc_reindex_listlike>`.

pandas provides a suite of methods in order to have **purely label based indexing**. This is a strict inclusion based protocol.
Every label asked for must be in the index, or a ``KeyError`` will be raised.
When slicing, both the start bound **AND** the stop bound are *included*, if present in the index.
Expand Down Expand Up @@ -622,12 +615,6 @@ For getting *multiple* indexers, using ``.get_indexer``:
Indexing with list with missing labels is deprecated
----------------------------------------------------

.. warning::

.. versionchanged:: 1.0.0

Using ``.loc`` or ``[]`` with a list with one or more missing labels will no longer reindex, in favor of ``.reindex``.

In prior versions, using ``.loc[list-of-labels]`` would work as long as *at least 1* of the keys was found (otherwise it
would raise a ``KeyError``). This behavior was changed and will now raise a ``KeyError`` if at least one label is missing.
The recommended alternative is to use ``.reindex()``.
Expand Down
7 changes: 1 addition & 6 deletions doc/source/user_guide/integer_na.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ Nullable integer data type
.. note::

IntegerArray is currently experimental. Its API or implementation may
change without warning.

.. versionchanged:: 1.0.0

Now uses :attr:`pandas.NA` as the missing value rather
than :attr:`numpy.nan`.
change without warning. Uses :attr:`pandas.NA` as the missing value.

In :ref:`missing_data`, we saw that pandas primarily uses ``NaN`` to represent
missing data. Because ``NaN`` is a float, this forces an array of integers with
Expand Down
9 changes: 0 additions & 9 deletions doc/source/user_guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3634,11 +3634,6 @@ It is often the case that users will insert columns to do temporary computations
in Excel and you may not want to read in those columns. ``read_excel`` takes
a ``usecols`` keyword to allow you to specify a subset of columns to parse.

.. versionchanged:: 1.0.0

Passing in an integer for ``usecols`` will no longer work. Please pass in a list
of ints from 0 to ``usecols`` inclusive instead.

You can specify a comma-delimited set of Excel columns and ranges as a string:

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

.. versionadded:: 1.0.0

The :func:`~pandas.read_excel` method can also read binary Excel files
using the ``pyxlsb`` module. The semantics and features for reading
binary Excel files mostly match what can be done for `Excel files`_ using
Expand Down Expand Up @@ -5419,8 +5412,6 @@ The above example creates a partitioned dataset that may look like:
ORC
---

.. versionadded:: 1.0.0

Similar to the :ref:`parquet <io.parquet>` format, the `ORC Format <https://orc.apache.org/>`__ is a binary columnar serialization
for data frames. It is designed to make reading data frames efficient. pandas provides both the reader and the writer for the
ORC format, :func:`~pandas.read_orc` and :func:`~pandas.DataFrame.to_orc`. This requires the `pyarrow <https://arrow.apache.org/docs/python/>`__ library.
Expand Down
2 changes: 0 additions & 2 deletions doc/source/user_guide/missing_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,6 @@ Experimental ``NA`` scalar to denote missing values

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

.. versionadded:: 1.0.0

Starting from pandas 1.0, an experimental ``pd.NA`` value (singleton) is
available to represent scalar missing values. At this moment, it is used in
the nullable :doc:`integer <integer_na>`, boolean and
Expand Down
2 changes: 0 additions & 2 deletions doc/source/user_guide/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ Working with text data
Text data types
---------------

.. versionadded:: 1.0.0

There are two ways to store text data in pandas:

1. ``object`` -dtype NumPy array.
Expand Down
2 changes: 0 additions & 2 deletions doc/source/user_guide/timeseries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,6 @@ which can be specified. These are computed from the starting point specified by
that was discussed :ref:`above<timeseries.converting.format>`). The
available units are listed on the documentation for :func:`pandas.to_datetime`.

.. versionchanged:: 1.0.0

Constructing a :class:`Timestamp` or :class:`DatetimeIndex` with an epoch timestamp
with the ``tz`` argument specified will raise a ValueError. If you have
epochs in wall time in another timezone, you can read the epochs
Expand Down
2 changes: 0 additions & 2 deletions doc/source/user_guide/visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1318,8 +1318,6 @@ with "(right)" in the legend. To turn off the automatic marking, use the
Custom formatters for timeseries plots
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionchanged:: 1.0.0

pandas provides custom formatters for timeseries plots. These change the
formatting of the axis labels for dates and times. By default,
the custom formatters are applied only to plots created by pandas with
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/missing.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,6 @@ class NAType(C_NAType):
Experimental: the behaviour of NA can still change without warning.
.. versionadded:: 1.0.0
The NA singleton is a missing value indicator defined by pandas. It is
used in certain new extension dtypes (currently the "string" dtype).
"""
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/arrays/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,6 @@ def to_numpy(
"""
Convert to a NumPy ndarray.
.. versionadded:: 1.0.0
This is similar to :meth:`numpy.asarray`, but may provide additional control
over how the conversion is done.
Expand Down
4 changes: 0 additions & 4 deletions pandas/core/arrays/boolean.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class BooleanDtype(BaseMaskedDtype):
"""
Extension dtype for boolean data.
.. versionadded:: 1.0.0
.. warning::
BooleanDtype is considered experimental. The implementation and
Expand Down Expand Up @@ -246,8 +244,6 @@ class BooleanArray(BaseMaskedArray):
:func:`pandas.array` specifying ``dtype="boolean"`` (see examples
below).
.. versionadded:: 1.0.0
.. warning::
BooleanArray is considered experimental. The implementation and
Expand Down
12 changes: 2 additions & 10 deletions pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -1987,18 +1987,14 @@ def min(self, *, skipna: bool = True, **kwargs):
Only ordered `Categoricals` have a minimum!
.. versionchanged:: 1.0.0
Returns an NA value on empty arrays
Raises
------
TypeError
If the `Categorical` is not `ordered`.
Returns
-------
min : the minimum of this `Categorical`
min : the minimum of this `Categorical`, NA value if empty
"""
nv.validate_minmax_axis(kwargs.get("axis", 0))
nv.validate_min((), kwargs)
Expand All @@ -2023,18 +2019,14 @@ def max(self, *, skipna: bool = True, **kwargs):
Only ordered `Categoricals` have a maximum!
.. versionchanged:: 1.0.0
Returns an NA value on empty arrays
Raises
------
TypeError
If the `Categorical` is not `ordered`.
Returns
-------
max : the maximum of this `Categorical`
max : the maximum of this `Categorical`, NA if array is empty
"""
nv.validate_minmax_axis(kwargs.get("axis", 0))
nv.validate_max((), kwargs)
Expand Down
12 changes: 3 additions & 9 deletions pandas/core/arrays/integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class IntegerDtype(NumericDtype):
An ExtensionDtype to hold a single size & kind of integer dtype.
These specific implementations are subclasses of the non-public
IntegerDtype. For example we have Int8Dtype to represent signed int 8s.
IntegerDtype. For example, we have Int8Dtype to represent signed int 8s.
The attributes name & type are set when these subclasses are created.
"""
Expand Down Expand Up @@ -63,10 +63,7 @@ class IntegerArray(NumericArray):
"""
Array of integer (optional missing) values.
.. versionchanged:: 1.0.0
Now uses :attr:`pandas.NA` as the missing value rather
than :attr:`numpy.nan`.
Uses :attr:`pandas.NA` as the missing value.
.. warning::
Expand Down Expand Up @@ -141,10 +138,7 @@ class IntegerArray(NumericArray):
_dtype_docstring = """
An ExtensionDtype for {dtype} integer data.
.. versionchanged:: 1.0.0
Now uses :attr:`pandas.NA` as its missing value,
rather than :attr:`numpy.nan`.
Uses :attr:`pandas.NA` as its missing value, rather than :attr:`numpy.nan`.
Attributes
----------
Expand Down
4 changes: 0 additions & 4 deletions pandas/core/arrays/string_.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ class StringDtype(StorageExtensionDtype):
"""
Extension dtype for string data.
.. versionadded:: 1.0.0
.. warning::
StringDtype is considered experimental. The implementation and
Expand Down Expand Up @@ -233,8 +231,6 @@ class StringArray(BaseStringArray, PandasArray):
"""
Extension array for string data.
.. versionadded:: 1.0.0
.. warning::
StringArray is considered experimental. The implementation and
Expand Down
5 changes: 0 additions & 5 deletions pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,15 +496,10 @@ def to_numpy(
na_value : Any, optional
The value to use for missing values. The default value depends
on `dtype` and the type of the array.
.. versionadded:: 1.0.0
**kwargs
Additional keywords passed through to the ``to_numpy`` method
of the underlying array (for extension arrays).
.. versionadded:: 1.0.0
Returns
-------
numpy.ndarray
Expand Down
6 changes: 0 additions & 6 deletions pandas/core/construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ def array(
For all other cases, NumPy's usual inference rules will be used.
.. versionchanged:: 1.0.0
Pandas infers nullable-integer dtype for integer data,
string dtype for string data, and nullable-boolean dtype
for boolean data.
.. versionchanged:: 1.2.0
Pandas now also infers nullable-floating dtype for float-like
Expand Down
26 changes: 2 additions & 24 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1223,12 +1223,8 @@ def to_string(
(when number of rows is above `max_rows`).
max_colwidth : int, optional
Max width to truncate each column in characters. By default, no limit.
.. versionadded:: 1.0.0
encoding : str, default "utf-8"
Set character encoding.
.. versionadded:: 1.0
%(returns)s
See Also
--------
Expand Down Expand Up @@ -2541,10 +2537,6 @@ def to_stata(
String, path object (implementing ``os.PathLike[str]``), or file-like
object implementing a binary ``write()`` function.
.. versionchanged:: 1.0.0
Previously this was "fname"
convert_dates : dict
Dictionary mapping columns containing datetime types to stata
internal format to use when writing the dates. Options are 'tc',
Expand Down Expand Up @@ -2581,10 +2573,6 @@ def to_stata(
smaller datasets in format 119 may have unintended consequences,
and, as of November 2020, Stata SE cannot read version 119 files.
.. versionchanged:: 1.0.0
Added support for formats 118 and 119.
convert_strl : list, optional
List of column names to convert to string columns to Stata StrL
format. Only available if version is 117. Storing strings in the
Expand Down Expand Up @@ -4304,9 +4292,6 @@ def query(self, expr: str, *, inplace: bool = False, **kwargs) -> DataFrame | No
For example, if one of your columns is called ``a a`` and you want
to sum it with ``b``, your query should be ```a a` + b``.
.. versionadded:: 1.0.0
Expanding functionality of backtick quoting for more than only spaces.
inplace : bool
Whether to modify the DataFrame rather than creating a new one.
**kwargs
Expand Down Expand Up @@ -6283,10 +6268,8 @@ def dropna(
* 0, or 'index' : Drop rows which contain missing values.
* 1, or 'columns' : Drop columns which contain missing value.
.. versionchanged:: 1.0.0
Pass tuple or list to drop on multiple axes.
Only a single axis is allowed.
Pass tuple or list to drop on multiple axes.
Only a single axis is allowed.
how : {'any', 'all'}, default 'any'
Determine if row or column is removed from DataFrame, when we have
Expand Down Expand Up @@ -6452,8 +6435,6 @@ def drop_duplicates(
ignore_index : bool, default ``False``
If ``True``, the resulting axis will be labeled 0, 1, …, n - 1.
.. versionadded:: 1.0.0
Returns
-------
DataFrame or None
Expand Down Expand Up @@ -6879,9 +6860,6 @@ def sort_index(
levels too (in order) after sorting by specified level.
ignore_index : bool, default False
If True, the resulting axis will be labeled 0, 1, …, n - 1.
.. versionadded:: 1.0.0
key : callable, optional
If not None, apply the key function to the index values
before sorting. This is similar to the `key` argument in the
Expand Down

0 comments on commit 3f2b18a

Please sign in to comment.