Skip to content

Commit a063922

Browse files
topper-123quintusdias
authored andcommitted
Remove .. versonadded:: 0.18 (pandas-dev#27463)
1 parent e22cf83 commit a063922

24 files changed

+4
-92
lines changed

doc/source/getting_started/basics.rst

-2
Original file line numberDiff line numberDiff line change
@@ -1422,8 +1422,6 @@ The :meth:`~DataFrame.rename` method also provides an ``inplace`` named
14221422
parameter that is by default ``False`` and copies the underlying data. Pass
14231423
``inplace=True`` to rename the data in place.
14241424

1425-
.. versionadded:: 0.18.0
1426-
14271425
Finally, :meth:`~Series.rename` also accepts a scalar or list-like
14281426
for altering the ``Series.name`` attribute.
14291427

doc/source/getting_started/dsintro.rst

-2
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,6 @@ Series can also have a ``name`` attribute:
251251
The Series ``name`` will be assigned automatically in many cases, in particular
252252
when taking 1D slices of DataFrame as you will see below.
253253

254-
.. versionadded:: 0.18.0
255-
256254
You can rename a Series with the :meth:`pandas.Series.rename` method.
257255

258256
.. ipython:: python

doc/source/user_guide/enhancingperf.rst

+1-5
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,6 @@ This allows for *formulaic evaluation*. The assignment target can be a
601601
new column name or an existing column name, and it must be a valid Python
602602
identifier.
603603

604-
.. versionadded:: 0.18.0
605-
606604
The ``inplace`` keyword determines whether this assignment will performed
607605
on the original ``DataFrame`` or return a copy with the new column.
608606

@@ -652,9 +650,7 @@ The equivalent in standard Python would be
652650
df['a'] = 1
653651
df
654652
655-
.. versionadded:: 0.18.0
656-
657-
The ``query`` method gained the ``inplace`` keyword which determines
653+
The ``query`` method has a ``inplace`` keyword which determines
658654
whether the query modifies the original frame.
659655

660656
.. ipython:: python

doc/source/user_guide/groupby.rst

+3-6
Original file line numberDiff line numberDiff line change
@@ -827,13 +827,10 @@ and that the transformed data contains no NAs.
827827
828828
.. _groupby.transform.window_resample:
829829

830-
New syntax to window and resample operations
831-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
832-
.. versionadded:: 0.18.1
830+
Window and resample operations
831+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
833832

834-
Working with the resample, expanding or rolling operations on the groupby
835-
level used to require the application of helper functions. However,
836-
now it is possible to use ``resample()``, ``expanding()`` and
833+
It is possible to use ``resample()``, ``expanding()`` and
837834
``rolling()`` as methods on groupbys.
838835

839836
The example below will apply the ``rolling()`` method on the samples of

doc/source/user_guide/indexing.rst

-4
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ of multi-axis indexing.
6767
* A ``callable`` function with one argument (the calling Series or DataFrame) and
6868
that returns valid output for indexing (one of the above).
6969

70-
.. versionadded:: 0.18.1
71-
7270
See more at :ref:`Selection by Label <indexing.label>`.
7371

7472
* ``.iloc`` is primarily integer position based (from ``0`` to
@@ -538,8 +536,6 @@ A list of indexers where any element is out of bounds will raise an
538536
Selection by callable
539537
---------------------
540538

541-
.. versionadded:: 0.18.1
542-
543539
``.loc``, ``.iloc``, and also ``[]`` indexing can accept a ``callable`` as indexer.
544540
The ``callable`` must be a function with one argument (the calling Series or DataFrame) that returns valid output for indexing.
545541

doc/source/user_guide/io.rst

-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ delim_whitespace : boolean, default False
8787
If this option is set to ``True``, nothing should be passed in for the
8888
``delimiter`` parameter.
8989

90-
.. versionadded:: 0.18.1 support for the Python parser.
91-
9290
Column and index locations and names
9391
++++++++++++++++++++++++++++++++++++
9492

doc/source/user_guide/reshaping.rst

-4
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,6 @@ values will be set to ``NaN``.
254254
df3
255255
df3.unstack()
256256
257-
.. versionadded:: 0.18.0
258-
259257
Alternatively, unstack takes an optional ``fill_value`` argument, for specifying
260258
the value of missing data.
261259

@@ -630,8 +628,6 @@ the prefix separator. You can specify ``prefix`` and ``prefix_sep`` in 3 ways:
630628
from_dict = pd.get_dummies(df, prefix={'B': 'from_B', 'A': 'from_A'})
631629
from_dict
632630
633-
.. versionadded:: 0.18.0
634-
635631
Sometimes it will be useful to only keep k-1 levels of a categorical
636632
variable to avoid collinearity when feeding the result to statistical models.
637633
You can switch to this mode by turn on ``drop_first``.

doc/source/user_guide/text.rst

-2
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,6 @@ For example if they are separated by a ``'|'``:
560560
561561
String ``Index`` also supports ``get_dummies`` which returns a ``MultiIndex``.
562562

563-
.. versionadded:: 0.18.1
564-
565563
.. ipython:: python
566564
567565
idx = pd.Index(['a', 'a|b', np.nan, 'a|c'])

doc/source/user_guide/timeseries.rst

-4
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,6 @@ option, see the Python `datetime documentation`_.
255255
Assembling datetime from multiple DataFrame columns
256256
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
257257

258-
.. versionadded:: 0.18.1
259-
260258
You can also pass a ``DataFrame`` of integer or string columns to assemble into a ``Series`` of ``Timestamps``.
261259

262260
.. ipython:: python
@@ -1165,8 +1163,6 @@ following subsection.
11651163
Custom business hour
11661164
~~~~~~~~~~~~~~~~~~~~
11671165

1168-
.. versionadded:: 0.18.1
1169-
11701166
The ``CustomBusinessHour`` is a mixture of ``BusinessHour`` and ``CustomBusinessDay`` which
11711167
allows you to specify arbitrary holidays. ``CustomBusinessHour`` works as the same
11721168
as ``BusinessHour`` except that it skips specified custom holidays.

pandas/core/frame.py

-9
Original file line numberDiff line numberDiff line change
@@ -3087,8 +3087,6 @@ def query(self, expr, inplace=False, **kwargs):
30873087
See the documentation for :func:`eval` for complete details
30883088
on the keyword arguments accepted by :meth:`DataFrame.query`.
30893089
3090-
.. versionadded:: 0.18.0
3091-
30923090
Returns
30933091
-------
30943092
DataFrame
@@ -5303,11 +5301,6 @@ def swaplevel(self, i=-2, j=-1, axis=0):
53035301
Returns
53045302
-------
53055303
DataFrame
5306-
5307-
.. versionchanged:: 0.18.1
5308-
5309-
The indexes ``i`` and ``j`` are now optional, and default to
5310-
the two innermost levels of the index.
53115304
"""
53125305
result = self.copy()
53135306

@@ -8213,8 +8206,6 @@ def quantile(self, q=0.5, axis=0, numeric_only=True, interpolation="linear"):
82138206
* nearest: `i` or `j` whichever is nearest.
82148207
* midpoint: (`i` + `j`) / 2.
82158208
8216-
.. versionadded:: 0.18.0
8217-
82188209
Returns
82198210
-------
82208211
Series or DataFrame

pandas/core/generic.py

-9
Original file line numberDiff line numberDiff line change
@@ -997,11 +997,6 @@ def swaplevel(self, i=-2, j=-1, axis=0):
997997
Returns
998998
-------
999999
swapped : same type as caller (new object)
1000-
1001-
.. versionchanged:: 0.18.1
1002-
1003-
The indexes ``i`` and ``j`` are now optional, and default to
1004-
the two innermost levels of the index.
10051000
"""
10061001
axis = self._get_axis_number(axis)
10071002
result = self.copy()
@@ -9140,10 +9135,6 @@ def _where(
91409135
If `cond` is callable, it is computed on the %(klass)s and
91419136
should return boolean %(klass)s or array. The callable must
91429137
not change input %(klass)s (though pandas doesn't check it).
9143-
9144-
.. versionadded:: 0.18.1
9145-
A callable can be used as cond.
9146-
91479138
other : scalar, %(klass)s, or callable
91489139
Entries where `cond` is %(cond_rev)s are replaced with
91499140
corresponding value from `other`.

pandas/core/indexes/base.py

-5
Original file line numberDiff line numberDiff line change
@@ -4904,11 +4904,6 @@ def isin(self, values, level=None):
49044904
----------
49054905
values : set or list-like
49064906
Sought values.
4907-
4908-
.. versionadded:: 0.18.1
4909-
4910-
Support for values as a set.
4911-
49124907
level : str or int, optional
49134908
Name or position of the index level to use (if the index is a
49144909
`MultiIndex`).

pandas/core/indexes/multi.py

-5
Original file line numberDiff line numberDiff line change
@@ -2197,11 +2197,6 @@ def swaplevel(self, i=-2, j=-1):
21972197
MultiIndex
21982198
A new MultiIndex.
21992199
2200-
.. versionchanged:: 0.18.1
2201-
2202-
The indexes ``i`` and ``j`` are now optional, and default to
2203-
the two innermost levels of the index.
2204-
22052200
See Also
22062201
--------
22072202
Series.swaplevel : Swap levels i and j in a MultiIndex.

pandas/core/resample.py

-4
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,6 @@ def interpolate(
781781
):
782782
"""
783783
Interpolate values according to different methods.
784-
785-
.. versionadded:: 0.18.1
786784
"""
787785
result = self._upsample(None)
788786
return result.interpolate(
@@ -1259,8 +1257,6 @@ def _upsample(self, method, limit=None, fill_value=None):
12591257
class PeriodIndexResamplerGroupby(_GroupByMixin, PeriodIndexResampler):
12601258
"""
12611259
Provides a resample of a groupby implementation.
1262-
1263-
.. versionadded:: 0.18.1
12641260
"""
12651261

12661262
@property

pandas/core/reshape/pivot.py

-2
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,6 @@ def crosstab(
480480
- If passed 'columns' will normalize over each column.
481481
- If margins is `True`, will also normalize margin values.
482482
483-
.. versionadded:: 0.18.1
484-
485483
Returns
486484
-------
487485
DataFrame

pandas/core/reshape/reshape.py

-3
Original file line numberDiff line numberDiff line change
@@ -781,9 +781,6 @@ def get_dummies(
781781
drop_first : bool, default False
782782
Whether to get k-1 dummies out of k categorical levels by removing the
783783
first level.
784-
785-
.. versionadded:: 0.18.0
786-
787784
dtype : dtype, default np.uint8
788785
Data type for new columns. Only a single dtype is allowed.
789786

pandas/core/series.py

-4
Original file line numberDiff line numberDiff line change
@@ -2350,8 +2350,6 @@ def quantile(self, q=0.5, interpolation="linear"):
23502350
q : float or array-like, default 0.5 (50% quantile)
23512351
0 <= q <= 1, the quantile(s) to compute.
23522352
interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
2353-
.. versionadded:: 0.18.0
2354-
23552353
This optional parameter specifies the interpolation method to use,
23562354
when the desired quantile lies between two data points `i` and `j`:
23572355
@@ -3707,8 +3705,6 @@ def unstack(self, level=-1, fill_value=None):
37073705
fill_value : scalar value, default None
37083706
Value to use when replacing NaN values.
37093707
3710-
.. versionadded:: 0.18.0
3711-
37123708
Returns
37133709
-------
37143710
DataFrame

pandas/core/strings.py

-2
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,6 @@ def str_extract(arr, pat, flags=0, expand=True):
837837
If False, return a Series/Index if there is one capture group
838838
or DataFrame if there are multiple capture groups.
839839
840-
.. versionadded:: 0.18.0
841-
842840
Returns
843841
-------
844842
DataFrame or Series or Index

pandas/core/tools/datetimes.py

-3
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,6 @@ def to_datetime(
577577
Parameters
578578
----------
579579
arg : integer, float, string, datetime, list, tuple, 1-d array, Series
580-
581-
.. versionadded:: 0.18.1
582-
583580
or DataFrame/dict-like
584581
585582
errors : {'ignore', 'raise', 'coerce'}, default 'raise'

pandas/core/window.py

-6
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,6 @@ class Window(_Window):
477477
"""
478478
Provide rolling window calculations.
479479
480-
.. versionadded:: 0.18.0
481-
482480
Parameters
483481
----------
484482
window : int, or offset
@@ -1984,8 +1982,6 @@ class Expanding(_Rolling_and_Expanding):
19841982
"""
19851983
Provide expanding transformations.
19861984
1987-
.. versionadded:: 0.18.0
1988-
19891985
Parameters
19901986
----------
19911987
min_periods : int, default 1
@@ -2271,8 +2267,6 @@ class EWM(_Rolling):
22712267
r"""
22722268
Provide exponential weighted functions.
22732269
2274-
.. versionadded:: 0.18.0
2275-
22762270
Parameters
22772271
----------
22782272
com : float, optional

pandas/io/formats/format.py

-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@
102102
Display DataFrame dimensions (number of rows by number of columns).
103103
decimal : str, default '.'
104104
Character recognized as decimal separator, e.g. ',' in Europe.
105-
106-
.. versionadded:: 0.18.0
107105
"""
108106

109107
_VALID_JUSTIFY_PARAMETERS = (

pandas/io/formats/style.py

-2
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,6 @@ def format(self, formatter, subset=None):
414414
"""
415415
Format the text display value of cells.
416416
417-
.. versionadded:: 0.18.0
418-
419417
Parameters
420418
----------
421419
formatter : str, callable, or dict

pandas/io/parsers.py

-3
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,6 @@
277277
following extensions: '.gz', '.bz2', '.zip', or '.xz' (otherwise no
278278
decompression). If using 'zip', the ZIP file must contain only one data
279279
file to be read in. Set to None for no decompression.
280-
281-
.. versionadded:: 0.18.1 support for 'zip' and 'xz' compression.
282-
283280
thousands : str, optional
284281
Thousands separator.
285282
decimal : str, default '.'

pandas/tseries/offsets.py

-2
Original file line numberDiff line numberDiff line change
@@ -1075,8 +1075,6 @@ def onOffset(self, dt):
10751075
class CustomBusinessHour(_CustomMixin, BusinessHourMixin, SingleConstructorOffset):
10761076
"""
10771077
DateOffset subclass representing possibly n custom business days.
1078-
1079-
.. versionadded:: 0.18.1
10801078
"""
10811079

10821080
_prefix = "CBH"

0 commit comments

Comments
 (0)