Skip to content

Commit 97f2238

Browse files
committed
DOC: Remove ..versionchanged less than version 2.0
1 parent bdc9a7b commit 97f2238

File tree

19 files changed

+38
-186
lines changed

19 files changed

+38
-186
lines changed

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
@@ -1443,8 +1443,6 @@ def any(
14431443
missing values are present, similar :ref:`Kleene logic <boolean.kleene>`
14441444
is used as for logical operations.
14451445
1446-
.. versionchanged:: 1.4.0
1447-
14481446
Parameters
14491447
----------
14501448
skipna : bool, default True
@@ -1531,8 +1529,6 @@ def all(
15311529
missing values are present, similar :ref:`Kleene logic <boolean.kleene>`
15321530
is used as for logical operations.
15331531
1534-
.. versionchanged:: 1.4.0
1535-
15361532
Parameters
15371533
----------
15381534
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: 4 additions & 14 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.
@@ -2671,17 +2669,13 @@ def to_stata(
26712669
8 characters and values are repeated.
26722670
{compression_options}
26732671
2674-
.. versionchanged:: 1.4.0 Zstandard support.
2675-
26762672
{storage_options}
26772673
26782674
value_labels : dict of dicts
26792675
Dictionary containing columns as keys and dictionaries of column value
26802676
to labels as values. Labels for a single variable must be 32,000
26812677
characters or smaller.
26822678
2683-
.. versionadded:: 1.4.0
2684-
26852679
Raises
26862680
------
26872681
NotImplementedError
@@ -3519,8 +3513,6 @@ def to_xml(
35193513
scripts and not later versions is currently supported.
35203514
{compression_options}
35213515
3522-
.. versionchanged:: 1.4.0 Zstandard support.
3523-
35243516
{storage_options}
35253517
35263518
Returns
@@ -9464,12 +9456,10 @@ def groupby(
94649456
when the result's index (and column) labels match the inputs, and
94659457
are included otherwise.
94669458
9467-
.. versionchanged:: 1.5.0
9468-
9469-
Warns that ``group_keys`` will no longer be ignored when the
9470-
result from ``apply`` is a like-indexed Series or DataFrame.
9471-
Specify ``group_keys`` explicitly to include the group keys or
9472-
not.
9459+
Warns that ``group_keys`` will no longer be ignored when the
9460+
result from ``apply`` is a like-indexed Series or DataFrame.
9461+
Specify ``group_keys`` explicitly to include the group keys or
9462+
not.
94739463
94749464
.. versionchanged:: 2.0.0
94759465

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
@@ -207,9 +207,7 @@ def _get_data_to_aggregate(
207207
1 1 2
208208
2 3 4
209209
210-
.. versionchanged:: 1.3.0
211-
212-
The resulting dtype will reflect the return value of the aggregating function.
210+
The resulting dtype will reflect the return value of the aggregating function.
213211
214212
>>> s.groupby([1, 1, 2, 2]).agg(lambda x: x.astype(float).min())
215213
1 1.0
@@ -263,11 +261,8 @@ def apply(self, func, *args, **kwargs) -> Series:
263261
264262
Notes
265263
-----
266-
267-
.. versionchanged:: 1.3.0
268-
269-
The resulting dtype will reflect the return value of the passed ``func``,
270-
see the examples below.
264+
The resulting dtype will reflect the return value of the passed ``func``,
265+
see the examples below.
271266
272267
Functions that mutate the passed object can produce unexpected
273268
behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
@@ -288,9 +283,7 @@ def apply(self, func, *args, **kwargs) -> Series:
288283
its argument and returns a Series. `apply` combines the result for
289284
each group together into a new Series.
290285
291-
.. versionchanged:: 1.3.0
292-
293-
The resulting dtype will reflect the return value of the passed ``func``.
286+
The resulting dtype will reflect the return value of the passed ``func``.
294287
295288
>>> g1.apply(lambda x: x * 2 if x.name == "a" else x / 2)
296289
a 0.0
@@ -411,10 +404,8 @@ def aggregate(self, func=None, *args, engine=None, engine_kwargs=None, **kwargs)
411404
behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
412405
for more details.
413406
414-
.. versionchanged:: 1.3.0
415-
416-
The resulting dtype will reflect the return value of the passed ``func``,
417-
see the examples below.
407+
The resulting dtype will reflect the return value of the passed ``func``,
408+
see the examples below.
418409
419410
Examples
420411
--------
@@ -453,10 +444,8 @@ def aggregate(self, func=None, *args, engine=None, engine_kwargs=None, **kwargs)
453444
1 1 2
454445
2 3 4
455446
456-
.. versionchanged:: 1.3.0
457-
458-
The resulting dtype will reflect the return value of the aggregating
459-
function.
447+
The resulting dtype will reflect the return value of the aggregating
448+
function.
460449
461450
>>> s.groupby([1, 1, 2, 2]).agg(lambda x: x.astype(float).min())
462451
1 1.0
@@ -661,8 +650,6 @@ def _wrap_applied_output(
661650
Parrot 25.0
662651
Name: Max Speed, dtype: float64
663652
664-
.. versionchanged:: 1.3.0
665-
666653
The resulting dtype will reflect the return value of the passed ``func``,
667654
for example:
668655
@@ -1744,9 +1731,7 @@ class DataFrameGroupBy(GroupBy[DataFrame]):
17441731
17451732
See :ref:`groupby.aggregate.named` for more.
17461733
1747-
.. versionchanged:: 1.3.0
1748-
1749-
The resulting dtype will reflect the return value of the aggregating function.
1734+
The resulting dtype will reflect the return value of the aggregating function.
17501735
17511736
>>> df.groupby("A")[["B"]].agg(lambda x: x.astype(float).min())
17521737
B
@@ -1837,10 +1822,8 @@ def aggregate(self, func=None, *args, engine=None, engine_kwargs=None, **kwargs)
18371822
behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
18381823
for more details.
18391824
1840-
.. versionchanged:: 1.3.0
1841-
1842-
The resulting dtype will reflect the return value of the passed ``func``,
1843-
see the examples below.
1825+
The resulting dtype will reflect the return value of the passed ``func``,
1826+
see the examples below.
18441827
18451828
Examples
18461829
--------
@@ -1920,10 +1903,8 @@ def aggregate(self, func=None, *args, engine=None, engine_kwargs=None, **kwargs)
19201903
19211904
See :ref:`groupby.aggregate.named` for more.
19221905
1923-
.. versionchanged:: 1.3.0
1924-
1925-
The resulting dtype will reflect the return value of the aggregating
1926-
function.
1906+
The resulting dtype will reflect the return value of the aggregating
1907+
function.
19271908
19281909
>>> df.groupby("A")[["B"]].agg(lambda x: x.astype(float).min())
19291910
B
@@ -2282,8 +2263,6 @@ def _transform_general(self, func, engine, engine_kwargs, *args, **kwargs):
22822263
4 3.666667 4.0
22832264
5 4.000000 5.0
22842265
2285-
.. versionchanged:: 1.3.0
2286-
22872266
The resulting dtype will reflect the return value of the passed ``func``,
22882267
for example:
22892268

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
@@ -1953,18 +1953,13 @@ def set_names(self, names, *, level=None, inplace: bool = False) -> Self | None:
19531953
19541954
Parameters
19551955
----------
1956-
19571956
names : Hashable or a sequence of the previous or dict-like for MultiIndex
19581957
Name(s) to set.
19591958
1960-
.. versionchanged:: 1.3.0
1961-
19621959
level : int, Hashable or a sequence of the previous, optional
19631960
If the index is a MultiIndex and names is not dict-like, level(s) to set
19641961
(None for all levels). Otherwise level must be None.
19651962
1966-
.. versionchanged:: 1.3.0
1967-
19681963
inplace : bool, default False
19691964
Modifies the object directly, instead of creating a new Index or
19701965
MultiIndex.

pandas/core/series.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5928,8 +5928,6 @@ def between(
59285928
inclusive : {"both", "neither", "left", "right"}
59295929
Include boundaries. Whether to set each bound as closed or open.
59305930
5931-
.. versionchanged:: 1.3.0
5932-
59335931
Returns
59345932
-------
59355933
Series

pandas/core/shared_docs.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,10 @@
139139
when the result's index (and column) labels match the inputs, and
140140
are included otherwise.
141141
142-
.. versionchanged:: 1.5.0
143-
144-
Warns that ``group_keys`` will no longer be ignored when the
145-
result from ``apply`` is a like-indexed Series or DataFrame.
146-
Specify ``group_keys`` explicitly to include the group keys or
147-
not.
142+
Warns that ``group_keys`` will no longer be ignored when the
143+
result from ``apply`` is a like-indexed Series or DataFrame.
144+
Specify ``group_keys`` explicitly to include the group keys or
145+
not.
148146
149147
.. versionchanged:: 2.0.0
150148
@@ -620,9 +618,6 @@
620618
4 None
621619
dtype: object
622620
623-
.. versionchanged:: 1.4.0
624-
Previously the explicit ``None`` was silently ignored.
625-
626621
When ``regex=True``, ``value`` is not ``None`` and `to_replace` is a string,
627622
the replacement will be applied in all columns of the DataFrame.
628623

0 commit comments

Comments
 (0)