Skip to content

Commit 893c784

Browse files
authored
DOC: Remove ..versionchanged less than version 2.0 (#62939)
1 parent c49fc82 commit 893c784

File tree

21 files changed

+31
-199
lines changed

21 files changed

+31
-199
lines changed

doc/source/user_guide/io.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ compression : {``'infer'``, ``'gzip'``, ``'bz2'``, ``'zip'``, ``'xz'``, ``'zstd'
303303
As an example, the following could be passed for faster compression and to
304304
create a reproducible gzip archive:
305305
``compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1}``.
306-
307-
.. versionchanged:: 1.2.0 Previous versions forwarded dict entries for 'gzip' to ``gzip.open``.
308306
thousands : str, default ``None``
309307
Thousands separator.
310308
decimal : str, default ``'.'``
@@ -1472,7 +1470,7 @@ rather than reading the entire file into memory, such as the following:
14721470
table
14731471
14741472
1475-
By specifying a ``chunksize`` to ``read_csv``, the return
1473+
By specifying a ``chunksize`` to :func:`read_csv` as a context manager, the return
14761474
value will be an iterable object of type ``TextFileReader``:
14771475

14781476
.. ipython:: python
@@ -1482,10 +1480,6 @@ value will be an iterable object of type ``TextFileReader``:
14821480
for chunk in reader:
14831481
print(chunk)
14841482
1485-
.. versionchanged:: 1.2
1486-
1487-
``read_csv/json/sas`` return a context-manager when iterating through a file.
1488-
14891483
Specifying ``iterator=True`` will also return the ``TextFileReader`` object:
14901484

14911485
.. ipython:: python

doc/source/user_guide/visualization.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,6 @@ The ``by`` keyword can be specified to plot grouped histograms:
326326
327327
In addition, the ``by`` keyword can also be specified in :meth:`DataFrame.plot.hist`.
328328

329-
.. versionchanged:: 1.4.0
330-
331329
.. ipython:: python
332330
333331
data = pd.DataFrame(
@@ -480,8 +478,6 @@ columns:
480478
481479
You could also create groupings with :meth:`DataFrame.plot.box`, for instance:
482480

483-
.. versionchanged:: 1.4.0
484-
485481
.. ipython:: python
486482
:suppress:
487483

pandas/core/arrays/categorical.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2545,10 +2545,6 @@ def unique(self) -> Self:
25452545
Return the ``Categorical`` which ``categories`` and ``codes`` are
25462546
unique.
25472547
2548-
.. versionchanged:: 1.3.0
2549-
2550-
Previously, unused categories were dropped from the new categories.
2551-
25522548
Returns
25532549
-------
25542550
Categorical

pandas/core/arrays/masked.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,8 +1686,6 @@ def any(
16861686
missing values are present, similar :ref:`Kleene logic <boolean.kleene>`
16871687
is used as for logical operations.
16881688
1689-
.. versionchanged:: 1.4.0
1690-
16911689
Parameters
16921690
----------
16931691
skipna : bool, default True
@@ -1774,8 +1772,6 @@ def all(
17741772
missing values are present, similar :ref:`Kleene logic <boolean.kleene>`
17751773
is used as for logical operations.
17761774
1777-
.. versionchanged:: 1.4.0
1778-
17791775
Parameters
17801776
----------
17811777
skipna : bool, default True

pandas/core/arrays/string_.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,7 @@ class StringArray(BaseStringArray, NumpyExtensionArray): # type: ignore[misc]
573573
:meth:`pandas.array` with ``dtype="string"`` for a stable way of
574574
creating a `StringArray` from any sequence.
575575
576-
.. versionchanged:: 1.5.0
577-
578-
StringArray now accepts array-likes containing
576+
StringArray accepts array-likes containing
579577
nan-likes(``None``, ``np.nan``) for the ``values`` parameter
580578
in addition to strings and :attr:`pandas.NA`
581579

pandas/core/frame.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,6 @@ class DataFrame(NDFrame, OpsMixin):
554554
If data is a dict containing one or more Series (possibly of different dtypes),
555555
``copy=False`` will ensure that these inputs are not copied.
556556
557-
.. versionchanged:: 1.3.0
558-
559557
See Also
560558
--------
561559
DataFrame.from_records : Constructor from tuples, also record arrays.
@@ -2686,17 +2684,13 @@ def to_stata(
26862684
8 characters and values are repeated.
26872685
{compression_options}
26882686
2689-
.. versionchanged:: 1.4.0 Zstandard support.
2690-
26912687
{storage_options}
26922688
26932689
value_labels : dict of dicts
26942690
Dictionary containing columns as keys and dictionaries of column value
26952691
to labels as values. Labels for a single variable must be 32,000
26962692
characters or smaller.
26972693
2698-
.. versionadded:: 1.4.0
2699-
27002694
Raises
27012695
------
27022696
NotImplementedError
@@ -3534,8 +3528,6 @@ def to_xml(
35343528
scripts and not later versions is currently supported.
35353529
{compression_options}
35363530
3537-
.. versionchanged:: 1.4.0 Zstandard support.
3538-
35393531
{storage_options}
35403532
35413533
Returns
@@ -9487,13 +9479,6 @@ def groupby(
94879479
when the result's index (and column) labels match the inputs, and
94889480
are included otherwise.
94899481
9490-
.. versionchanged:: 1.5.0
9491-
9492-
Warns that ``group_keys`` will no longer be ignored when the
9493-
result from ``apply`` is a like-indexed Series or DataFrame.
9494-
Specify ``group_keys`` explicitly to include the group keys or
9495-
not.
9496-
94979482
.. versionchanged:: 2.0.0
94989483
94999484
``group_keys`` now defaults to ``True``.

pandas/core/generic.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,8 +2415,6 @@ def to_json(
24152415
list-like.
24162416
{compression_options}
24172417
2418-
.. versionchanged:: 1.4.0 Zstandard support.
2419-
24202418
index : bool or None, default None
24212419
The index is only used when 'orient' is 'split', 'index', 'column',
24222420
or 'table'. Of these, 'index' and 'column' do not support
@@ -3850,12 +3848,6 @@ def to_csv(
38503848
The newline character or character sequence to use in the output
38513849
file. Defaults to `os.linesep`, which depends on the OS in which
38523850
this method is called ('\\n' for linux, '\\r\\n' for Windows, i.e.).
3853-
3854-
.. versionchanged:: 1.5.0
3855-
3856-
Previously was line_terminator, changed for consistency with
3857-
read_csv and the standard library 'csv' module.
3858-
38593851
chunksize : int or None
38603852
Rows to write at a time.
38613853
date_format : str, default None
@@ -5859,11 +5851,6 @@ def sample(
58595851
If int, array-like, or BitGenerator, seed for random number generator.
58605852
If np.random.RandomState or np.random.Generator, use as given.
58615853
Default ``None`` results in sampling with the current state of np.random.
5862-
5863-
.. versionchanged:: 1.4.0
5864-
5865-
np.random.Generator objects now accepted
5866-
58675854
axis : {0 or 'index', 1 or 'columns', None}, default None
58685855
Axis to sample. Accepts axis number or name. Default is stat axis
58695856
for given data type. For `Series` this parameter is unused and defaults to `None`.

pandas/core/groupby/generic.py

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,7 @@ def _get_data_to_aggregate(
251251
1 1 2
252252
2 3 4
253253
254-
.. versionchanged:: 1.3.0
255-
256-
The resulting dtype will reflect the return value of the aggregating function.
254+
The resulting dtype will reflect the return value of the aggregating function.
257255
258256
>>> s.groupby([1, 1, 2, 2]).agg(lambda x: x.astype(float).min())
259257
1 1.0
@@ -307,11 +305,8 @@ def apply(self, func, *args, **kwargs) -> Series:
307305
308306
Notes
309307
-----
310-
311-
.. versionchanged:: 1.3.0
312-
313-
The resulting dtype will reflect the return value of the passed ``func``,
314-
see the examples below.
308+
The resulting dtype will reflect the return value of the passed ``func``,
309+
see the examples below.
315310
316311
Functions that mutate the passed object can produce unexpected
317312
behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
@@ -332,9 +327,7 @@ def apply(self, func, *args, **kwargs) -> Series:
332327
its argument and returns a Series. `apply` combines the result for
333328
each group together into a new Series.
334329
335-
.. versionchanged:: 1.3.0
336-
337-
The resulting dtype will reflect the return value of the passed ``func``.
330+
The resulting dtype will reflect the return value of the passed ``func``.
338331
339332
>>> g1.apply(lambda x: x * 2 if x.name == "a" else x / 2)
340333
a 0.0
@@ -455,10 +448,8 @@ def aggregate(self, func=None, *args, engine=None, engine_kwargs=None, **kwargs)
455448
behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
456449
for more details.
457450
458-
.. versionchanged:: 1.3.0
459-
460-
The resulting dtype will reflect the return value of the passed ``func``,
461-
see the examples below.
451+
The resulting dtype will reflect the return value of the passed ``func``,
452+
see the examples below.
462453
463454
Examples
464455
--------
@@ -497,10 +488,8 @@ def aggregate(self, func=None, *args, engine=None, engine_kwargs=None, **kwargs)
497488
1 1 2
498489
2 3 4
499490
500-
.. versionchanged:: 1.3.0
501-
502-
The resulting dtype will reflect the return value of the aggregating
503-
function.
491+
The resulting dtype will reflect the return value of the aggregating
492+
function.
504493
505494
>>> s.groupby([1, 1, 2, 2]).agg(lambda x: x.astype(float).min())
506495
1 1.0
@@ -705,8 +694,6 @@ def _wrap_applied_output(
705694
Parrot 25.0
706695
Name: Max Speed, dtype: float64
707696
708-
.. versionchanged:: 1.3.0
709-
710697
The resulting dtype will reflect the return value of the passed ``func``,
711698
for example:
712699
@@ -1788,9 +1775,7 @@ class DataFrameGroupBy(GroupBy[DataFrame]):
17881775
17891776
See :ref:`groupby.aggregate.named` for more.
17901777
1791-
.. versionchanged:: 1.3.0
1792-
1793-
The resulting dtype will reflect the return value of the aggregating function.
1778+
The resulting dtype will reflect the return value of the aggregating function.
17941779
17951780
>>> df.groupby("A")[["B"]].agg(lambda x: x.astype(float).min())
17961781
B
@@ -1881,10 +1866,8 @@ def aggregate(self, func=None, *args, engine=None, engine_kwargs=None, **kwargs)
18811866
behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
18821867
for more details.
18831868
1884-
.. versionchanged:: 1.3.0
1885-
1886-
The resulting dtype will reflect the return value of the passed ``func``,
1887-
see the examples below.
1869+
The resulting dtype will reflect the return value of the passed ``func``,
1870+
see the examples below.
18881871
18891872
Examples
18901873
--------
@@ -1964,10 +1947,8 @@ def aggregate(self, func=None, *args, engine=None, engine_kwargs=None, **kwargs)
19641947
19651948
See :ref:`groupby.aggregate.named` for more.
19661949
1967-
.. versionchanged:: 1.3.0
1968-
1969-
The resulting dtype will reflect the return value of the aggregating
1970-
function.
1950+
The resulting dtype will reflect the return value of the aggregating
1951+
function.
19711952
19721953
>>> df.groupby("A")[["B"]].agg(lambda x: x.astype(float).min())
19731954
B
@@ -2326,8 +2307,6 @@ def _transform_general(self, func, engine, engine_kwargs, *args, **kwargs):
23262307
4 3.666667 4.0
23272308
5 4.000000 5.0
23282309
2329-
.. versionchanged:: 1.3.0
2330-
23312310
The resulting dtype will reflect the return value of the passed ``func``,
23322311
for example:
23332312

pandas/core/groupby/groupby.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,8 @@ class providing the base-class of operations.
406406
The group data and group index will be passed as numpy arrays to the JITed
407407
user defined function, and no alternative execution attempts will be tried.
408408
409-
.. versionchanged:: 1.3.0
410-
411-
The resulting dtype will reflect the return value of the passed ``func``,
412-
see the examples below.
409+
The resulting dtype will reflect the return value of the passed ``func``,
410+
see the examples below.
413411
414412
.. versionchanged:: 2.0.0
415413
@@ -1518,11 +1516,8 @@ def apply(self, func, *args, include_groups: bool = False, **kwargs) -> NDFrameT
15181516
15191517
Notes
15201518
-----
1521-
1522-
.. versionchanged:: 1.3.0
1523-
1524-
The resulting dtype will reflect the return value of the passed ``func``,
1525-
see the examples below.
1519+
The resulting dtype will reflect the return value of the passed ``func``,
1520+
see the examples below.
15261521
15271522
Functions that mutate the passed object can produce unexpected
15281523
behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
@@ -1562,9 +1557,7 @@ def apply(self, func, *args, include_groups: bool = False, **kwargs) -> NDFrameT
15621557
its argument and returns a Series. `apply` combines the result for
15631558
each group together into a new DataFrame.
15641559
1565-
.. versionchanged:: 1.3.0
1566-
1567-
The resulting dtype will reflect the return value of the passed ``func``.
1560+
The resulting dtype will reflect the return value of the passed ``func``.
15681561
15691562
>>> g1[["B", "C"]].apply(lambda x: x.astype(float).max() - x.min())
15701563
B C
@@ -5563,10 +5556,6 @@ def sample(
55635556
If np.random.RandomState or np.random.Generator, use as given.
55645557
Default ``None`` results in sampling with the current state of np.random.
55655558
5566-
.. versionchanged:: 1.4.0
5567-
5568-
np.random.Generator objects now accepted
5569-
55705559
Returns
55715560
-------
55725561
Series or DataFrame

pandas/core/indexes/base.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,18 +1954,13 @@ def set_names(self, names, *, level=None, inplace: bool = False) -> Self | None:
19541954
19551955
Parameters
19561956
----------
1957-
19581957
names : Hashable or a sequence of the previous or dict-like for MultiIndex
19591958
Name(s) to set.
19601959
1961-
.. versionchanged:: 1.3.0
1962-
19631960
level : int, Hashable or a sequence of the previous, optional
19641961
If the index is a MultiIndex and names is not dict-like, level(s) to set
19651962
(None for all levels). Otherwise level must be None.
19661963
1967-
.. versionchanged:: 1.3.0
1968-
19691964
inplace : bool, default False
19701965
Modifies the object directly, instead of creating a new Index or
19711966
MultiIndex.

0 commit comments

Comments
 (0)