Skip to content

DOC: Remove all versionchanged / versionadded directives < 1.0.0 #50057

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 4 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 0 additions & 5 deletions doc/source/user_guide/dsintro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -712,11 +712,6 @@ The ufunc is applied to the underlying array in a :class:`Series`.
ser = pd.Series([1, 2, 3, 4])
np.exp(ser)

.. versionchanged:: 0.25.0

When multiple :class:`Series` are passed to a ufunc, they are aligned before
Copy link
Member

@phofl phofl Dec 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might make sense to keep the comments, just without the version changed directive. Also for the others

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, so we have to keep the comments, just remove the directives right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, also have to remove the tab before the comment. Has to be on the same level as the comments before and after

performing the operation.

Like other parts of the library, pandas will automatically align labeled inputs
as part of a ufunc with multiple inputs. For example, using :meth:`numpy.remainder`
on two :class:`Series` with differently ordered labels will align before the operation.
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 @@ -629,8 +629,6 @@ For a grouped ``DataFrame``, you can rename in a similar manner:
Named aggregation
~~~~~~~~~~~~~~~~~

.. versionadded:: 0.25.0

To support column-specific aggregation *with control over the output column names*, pandas
accepts the special syntax in :meth:`DataFrameGroupBy.agg` and :meth:`SeriesGroupBy.agg`, known as "named aggregation", where

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 @@ -294,8 +294,6 @@ cache_dates : boolean, default True
conversion. May produce significant speed-up when parsing duplicate
date strings, especially ones with timezone offsets.

.. versionadded:: 0.25.0

Iteration
+++++++++

Expand Down Expand Up @@ -3829,8 +3827,6 @@ using the `odfpy <https://pypi.org/project/odfpy/>`__ module. The semantics and
OpenDocument spreadsheets match what can be done for `Excel files`_ using
``engine='odf'``.

.. versionadded:: 0.25

The :func:`~pandas.read_excel` method can read OpenDocument spreadsheets

.. code-block:: python
Expand Down Expand Up @@ -6134,8 +6130,6 @@ No official documentation is available for the SAS7BDAT format.
SPSS formats
------------

.. versionadded:: 0.25.0

The top-level function :func:`read_spss` can read (but not write) SPSS
SAV (.sav) and ZSAV (.zsav) format files.

Expand Down
2 changes: 0 additions & 2 deletions doc/source/user_guide/reshaping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,6 @@ Note to subdivide over multiple columns we can pass in a list to the
Exploding a list-like column
----------------------------

.. versionadded:: 0.25.0

Sometimes the values in a column are list-like.

.. ipython:: python
Expand Down
5 changes: 0 additions & 5 deletions doc/source/user_guide/sparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ attributes and methods that are specific to sparse data.
This accessor is available only on data with ``SparseDtype``, and on the :class:`Series`
class itself for creating a Series with sparse data from a scipy COO matrix with.


.. versionadded:: 0.25.0

A ``.sparse`` accessor has been added for :class:`DataFrame` as well.
See :ref:`api.frame.sparse` for more.

Expand Down Expand Up @@ -271,8 +268,6 @@ Interaction with *scipy.sparse*

Use :meth:`DataFrame.sparse.from_spmatrix` to create a :class:`DataFrame` with sparse values from a sparse matrix.

.. versionadded:: 0.25.0

.. ipython:: python

from scipy.sparse import csr_matrix
Expand Down
4 changes: 0 additions & 4 deletions doc/source/user_guide/timeseries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,6 @@ We are stopping on the included end-point as it is part of the index:
dft2 = dft2.swaplevel(0, 1).sort_index()
dft2.loc[idx[:, "2013-01-05"], :]

.. versionadded:: 0.25.0

Slicing with string indexing also honors UTC offset.

.. ipython:: python
Expand Down Expand Up @@ -2348,8 +2346,6 @@ To return ``dateutil`` time zone objects, append ``dateutil/`` before the string
)
rng_utc.tz

.. versionadded:: 0.25.0

.. ipython:: python

# datetime.timezone
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/interval.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ cdef class IntervalMixin:
"""
Indicates if an interval is empty, meaning it contains no points.

.. versionadded:: 0.25.0

Returns
-------
bool or ndarray
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/tslibs/nattype.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,6 @@ cdef class _NaT(datetime):
"""
Convert the Timestamp to a NumPy datetime64 or timedelta64.

.. versionadded:: 0.25.0

With the default 'dtype', this is an alias method for `NaT.to_datetime64()`.

The copy parameter is available here only for compatibility. Its value
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/tslibs/timedeltas.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1243,8 +1243,6 @@ cdef class _Timedelta(timedelta):
"""
Convert the Timedelta to a NumPy timedelta64.

.. versionadded:: 0.25.0

This is an alias method for `Timedelta.to_timedelta64()`. The dtype and
copy parameters are available here only for compatibility. Their values
will not affect the return value.
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/tslibs/timestamps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1090,8 +1090,6 @@ cdef class _Timestamp(ABCTimestamp):
"""
Convert the Timestamp to a NumPy datetime64.

.. versionadded:: 0.25.0

This is an alias method for `Timestamp.to_datetime64()`. The dtype and
copy parameters are available here only for compatibility. Their values
will not affect the return value.
Expand Down
4 changes: 0 additions & 4 deletions pandas/core/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1499,8 +1499,6 @@ def searchsorted(
"""
Find indices where elements should be inserted to maintain order.

.. versionadded:: 0.25.0

Find the indices into a sorted array `arr` (a) such that, if the
corresponding elements in `value` were inserted before the indices,
the order of `arr` would be preserved.
Expand Down Expand Up @@ -1727,8 +1725,6 @@ def safe_sort(
codes equal to ``-1``. If ``verify=False``, it is assumed there
are no out of bound codes. Ignored when ``codes`` is None.

.. versionadded:: 0.25.0

Returns
-------
ordered : AnyArrayLike
Expand Down
4 changes: 0 additions & 4 deletions pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -1568,10 +1568,6 @@ def argsort(
"""
Return the indices that would sort the Categorical.

.. versionchanged:: 0.25.0

Changed to sort missing values at the end.

Parameters
----------
ascending : bool, default True
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/arrays/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -1594,8 +1594,6 @@ def mean(self, *, skipna: bool = True, axis: AxisInt | None = 0):
"""
Return the mean value of the Array.

.. versionadded:: 0.25.0

Parameters
----------
skipna : bool, default True
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/arrays/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -1596,8 +1596,6 @@ def repeat(
Return a boolean mask whether the value is contained in the Intervals
of the %(klass)s.

.. versionadded:: 0.25.0

Parameters
----------
other : scalar
Expand Down
10 changes: 0 additions & 10 deletions pandas/core/arrays/sparse/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ def to_dense(self) -> Series:
"""
Convert a Series from sparse values to dense.

.. versionadded:: 0.25.0

Returns
-------
Series:
Expand Down Expand Up @@ -227,8 +225,6 @@ def to_dense(self) -> Series:
class SparseFrameAccessor(BaseAccessor, PandasDelegate):
"""
DataFrame accessor for sparse data.

.. versionadded:: 0.25.0
"""

def _validate(self, data):
Expand All @@ -241,8 +237,6 @@ def from_spmatrix(cls, data, index=None, columns=None) -> DataFrame:
"""
Create a new DataFrame from a scipy sparse matrix.

.. versionadded:: 0.25.0

Parameters
----------
data : scipy.sparse.spmatrix
Expand Down Expand Up @@ -297,8 +291,6 @@ def to_dense(self) -> DataFrame:
"""
Convert a DataFrame with sparse values to dense.

.. versionadded:: 0.25.0

Returns
-------
DataFrame
Expand All @@ -322,8 +314,6 @@ def to_coo(self):
"""
Return the contents of the frame as a sparse SciPy COO matrix.

.. versionadded:: 0.25.0

Returns
-------
coo_matrix : scipy.sparse.spmatrix
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/arrays/sparse/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,6 @@ def from_spmatrix(cls: type[SparseArrayT], data: spmatrix) -> SparseArrayT:
"""
Create a SparseArray from a scipy.sparse matrix.

.. versionadded:: 0.25.0

Parameters
----------
data : scipy.sparse.sp_matrix
Expand Down
14 changes: 1 addition & 13 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,6 @@ class DataFrame(NDFrame, OpsMixin):
occurs if data is a Series or a DataFrame itself. Alignment is done on
Series/DataFrame inputs.

.. versionchanged:: 0.25.0
If data is a list of dicts, column order follows insertion-order.

index : Index or array-like
Index to use for resulting frame. Will default to RangeIndex if
no indexing information part of input data and no index provided.
Expand Down Expand Up @@ -3151,9 +3148,7 @@ def to_html(
header="Whether to print column labels, default True",
col_space_type="str or int, list or dict of int or str",
col_space="The minimum width of each column in CSS length "
"units. An int is assumed to be px units.\n\n"
" .. versionadded:: 0.25.0\n"
" Ability to use str",
"units. An int is assumed to be px units.\n\n",
)
@Substitution(shared_params=fmt.common_docstring, returns=fmt.return_docstring)
def to_html(
Expand Down Expand Up @@ -4349,9 +4344,6 @@ def query(self, expr: str, inplace: bool = False, **kwargs) -> DataFrame | None:
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:: 0.25.0
Backtick quoting introduced.

Comment on lines -4352 to -4354
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this one because it did not make sense to keep it.

.. versionadded:: 1.0.0
Expanding functionality of backtick quoting for more than only spaces.

Expand Down Expand Up @@ -8493,8 +8485,6 @@ def pivot(
If True: only show observed values for categorical groupers.
If False: show all values for categorical groupers.

.. versionchanged:: 0.25.0

sort : bool, default True
Specifies if the result should be sorted.

Expand Down Expand Up @@ -8808,8 +8798,6 @@ def explode(
"""
Transform each element of a list-like to a row, replicating index values.

.. versionadded:: 0.25.0

Parameters
----------
column : IndexLabel
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2916,8 +2916,6 @@ def union(self, other, sort=None):
If the Index objects are incompatible, both Index objects will be
cast to dtype('object') first.

.. versionchanged:: 0.25.0

Parameters
----------
other : Index or array-like
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/indexes/range.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,6 @@ def _union(self, other: Index, sort):
increasing and other is fully contained in self. Otherwise, returns
an unsorted ``Int64Index``

.. versionadded:: 0.25.0

Returns
-------
union : Index
Expand Down
1 change: 0 additions & 1 deletion pandas/core/reshape/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ def merge_ordered(
`right` should be left as-is, with no suffix. At least one of the
values must not be None.

.. versionchanged:: 0.25.0
how : {'left', 'right', 'outer', 'inner'}, default 'outer'
* left: use only keys from left frame (SQL: left outer join)
* right: use only keys from right frame (SQL: right outer join)
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -4117,8 +4117,6 @@ def explode(self, ignore_index: bool = False) -> Series:
"""
Transform each element of a list-like to a row.

.. versionadded:: 0.25.0

Parameters
----------
ignore_index : bool, default False
Expand Down
3 changes: 0 additions & 3 deletions pandas/core/shared_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,6 @@
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.

Comment on lines -554 to -556
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this comment because did not make sense to keep it here.

Returns
-------
{klass}
Expand Down
3 changes: 1 addition & 2 deletions pandas/core/strings/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ def cat(
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'`.

Expand Down Expand Up @@ -2978,7 +2977,7 @@ def len(self):
_doc_args["casefold"] = {
"type": "be casefolded",
"method": "casefold",
"version": "\n .. versionadded:: 0.25.0\n",
"version": "",
}

@Appender(_shared_docs["casemethods"] % _doc_args["lower"])
Expand Down
3 changes: 0 additions & 3 deletions pandas/core/tools/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,6 @@ def to_datetime(
out-of-bounds values will render the cache unusable and may slow down
parsing.

.. versionchanged:: 0.25.0
changed default value from :const:`False` to :const:`True`.

Comment on lines -827 to -829
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this comment, since the description already covers that default is True.

Returns
-------
datetime
Expand Down
2 changes: 0 additions & 2 deletions pandas/io/formats/printing.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,6 @@ def format_object_summary(
If False, only break lines when the a line of values gets wider
than the display width.

.. versionadded:: 0.25.0

Returns
-------
summary string
Expand Down
1 change: 0 additions & 1 deletion pandas/io/gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def read_gbq(
package. It also requires the ``google-cloud-bigquery-storage`` and
``fastavro`` packages.

.. versionadded:: 0.25.0
max_results : int, optional
If set, limit the maximum number of rows to fetch from the query
results.
Expand Down
8 changes: 0 additions & 8 deletions pandas/io/json/_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,19 +549,11 @@ def read_json(

For all ``orient`` values except ``'table'``, default is True.

.. versionchanged:: 0.25.0

Not applicable for ``orient='table'``.

convert_axes : bool, default None
Try to convert the axes to the proper dtypes.

For all ``orient`` values except ``'table'``, default is True.

.. versionchanged:: 0.25.0

Not applicable for ``orient='table'``.

convert_dates : bool or list of str, default True
If True then default datelike columns may be converted (depending on
keep_default_dates).
Expand Down
Loading