diff --git a/doc/source/development/contributing_codebase.rst b/doc/source/development/contributing_codebase.rst index e99dbbde3db85..184060d3cf697 100644 --- a/doc/source/development/contributing_codebase.rst +++ b/doc/source/development/contributing_codebase.rst @@ -959,9 +959,9 @@ directive is used. The sphinx syntax for that is: .. code-block:: rst - .. versionadded:: 1.1.0 + .. versionadded:: 2.1.0 -This will put the text *New in version 1.1.0* wherever you put the sphinx +This will put the text *New in version 2.1.0* wherever you put the sphinx directive. This should also be put in the docstring when adding a new function or method (`example `__) or a new keyword argument (`example `__). diff --git a/doc/source/user_guide/basics.rst b/doc/source/user_guide/basics.rst index 48fcaf85f0f59..989d5128d7d08 100644 --- a/doc/source/user_guide/basics.rst +++ b/doc/source/user_guide/basics.rst @@ -686,8 +686,6 @@ of a 1D array of values. It can also be used as a function on regular arrays: s.value_counts() pd.value_counts(data) -.. versionadded:: 1.1.0 - The :meth:`~DataFrame.value_counts` method can be used to count combinations across multiple columns. By default all columns are used but a subset can be selected using the ``subset`` argument. @@ -1812,8 +1810,6 @@ used to sort a pandas object by its index levels. .. _basics.sort_index_key: -.. versionadded:: 1.1.0 - Sorting by index also supports a ``key`` parameter that takes a callable function to apply to the index being sorted. For ``MultiIndex`` objects, the key is applied per-level to the levels specified by ``level``. @@ -1867,8 +1863,6 @@ argument: .. _basics.sort_value_key: -.. versionadded:: 1.1.0 - Sorting also supports a ``key`` parameter that takes a callable function to apply to the values being sorted. diff --git a/doc/source/user_guide/boolean.rst b/doc/source/user_guide/boolean.rst index a08a49bc2359c..3c361d4de17e5 100644 --- a/doc/source/user_guide/boolean.rst +++ b/doc/source/user_guide/boolean.rst @@ -24,8 +24,6 @@ Indexing with NA values pandas allows indexing with ``NA`` values in a boolean array, which are treated as ``False``. -.. versionchanged:: 1.0.2 - .. ipython:: python :okexcept: diff --git a/doc/source/user_guide/dsintro.rst b/doc/source/user_guide/dsintro.rst index 9aa6423908cfd..01ec336f7aae5 100644 --- a/doc/source/user_guide/dsintro.rst +++ b/doc/source/user_guide/dsintro.rst @@ -413,8 +413,6 @@ first ``namedtuple``, a ``ValueError`` is raised. From a list of dataclasses ~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 1.1.0 - Data Classes as introduced in `PEP557 `__, can be passed into the DataFrame constructor. Passing a list of dataclasses is equivalent to passing a list of dictionaries. diff --git a/doc/source/user_guide/groupby.rst b/doc/source/user_guide/groupby.rst index 88727bc8f9025..85a6b04f834e1 100644 --- a/doc/source/user_guide/groupby.rst +++ b/doc/source/user_guide/groupby.rst @@ -218,8 +218,6 @@ For example, the groups created by ``groupby()`` below are in the order they app .. _groupby.dropna: -.. versionadded:: 1.1.0 - GroupBy dropna ^^^^^^^^^^^^^^ diff --git a/doc/source/user_guide/indexing.rst b/doc/source/user_guide/indexing.rst index 4a8be77d23ea2..77eee8e58a5e8 100644 --- a/doc/source/user_guide/indexing.rst +++ b/doc/source/user_guide/indexing.rst @@ -371,8 +371,6 @@ For getting values with a boolean array: NA values in a boolean array propagate as ``False``: -.. versionchanged:: 1.0.2 - .. ipython:: python mask = pd.array([True, False, True, False, pd.NA, False], dtype="boolean") diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index 60353dde5683f..91cd7315f7213 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -335,7 +335,6 @@ compression : {``'infer'``, ``'gzip'``, ``'bz2'``, ``'zip'``, ``'xz'``, ``'zstd' create a reproducible gzip archive: ``compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1}``. - .. versionchanged:: 1.1.0 dict option extended to support ``gzip`` and ``bz2``. .. versionchanged:: 1.2.0 Previous versions forwarded dict entries for 'gzip' to ``gzip.open``. thousands : str, default ``None`` Thousands separator. @@ -3890,8 +3889,6 @@ The :func:`~pandas.read_excel` method can read OpenDocument spreadsheets # Returns a DataFrame pd.read_excel("path_to_file.ods", engine="odf") -.. versionadded:: 1.1.0 - Similarly, the :func:`~pandas.to_excel` method can write OpenDocument spreadsheets .. code-block:: python diff --git a/doc/source/user_guide/reshaping.rst b/doc/source/user_guide/reshaping.rst index 237ea1a4dd9c6..8d0f1048f6e77 100644 --- a/doc/source/user_guide/reshaping.rst +++ b/doc/source/user_guide/reshaping.rst @@ -298,8 +298,6 @@ For instance, When transforming a DataFrame using :func:`~pandas.melt`, the index will be ignored. The original index values can be kept around by setting the ``ignore_index`` parameter to ``False`` (default is ``True``). This will however duplicate them. -.. versionadded:: 1.1.0 - .. ipython:: python index = pd.MultiIndex.from_tuples([("person", "A"), ("person", "B")]) diff --git a/doc/source/user_guide/text.rst b/doc/source/user_guide/text.rst index 4e0b18c73ee29..c193df5118926 100644 --- a/doc/source/user_guide/text.rst +++ b/doc/source/user_guide/text.rst @@ -62,8 +62,6 @@ Or ``astype`` after the ``Series`` or ``DataFrame`` is created s.astype("string") -.. versionchanged:: 1.1.0 - You can also use :class:`StringDtype`/``"string"`` as the dtype on non-string data and it will be converted to ``string`` dtype: @@ -666,8 +664,6 @@ Or whether elements match a pattern: dtype="string", ).str.match(pattern) -.. versionadded:: 1.1.0 - .. ipython:: python pd.Series( diff --git a/doc/source/user_guide/timeseries.rst b/doc/source/user_guide/timeseries.rst index 0b73a7aea8b10..3519ac2d64f71 100644 --- a/doc/source/user_guide/timeseries.rst +++ b/doc/source/user_guide/timeseries.rst @@ -822,8 +822,6 @@ Furthermore, if you have a ``Series`` with datetimelike values, then you can access these properties via the ``.dt`` accessor, as detailed in the section on :ref:`.dt accessors`. -.. versionadded:: 1.1.0 - You may obtain the year, week and day components of the ISO year from the ISO 8601 standard: .. ipython:: python @@ -1870,8 +1868,6 @@ See :ref:`groupby.iterating-label` or :class:`Resampler.__iter__` for more. Use ``origin`` or ``offset`` to adjust the start of the bins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 1.1.0 - The bins of the grouping are adjusted based on the beginning of the day of the time series starting point. This works well with frequencies that are multiples of a day (like ``30D``) or that divide a day evenly (like ``90s`` or ``1min``). This can create inconsistencies with some frequencies that do not meet this criteria. To change this behavior you can specify a fixed Timestamp with the argument ``origin``. For example: @@ -2117,8 +2113,6 @@ PeriodIndex partial string indexing PeriodIndex now supports partial string slicing with non-monotonic indexes. -.. versionadded:: 1.1.0 - You can pass in dates and strings to ``Series`` and ``DataFrame`` with ``PeriodIndex``, in the same manner as ``DatetimeIndex``. For details, refer to :ref:`DatetimeIndex Partial String Indexing `. .. ipython:: python @@ -2491,8 +2485,6 @@ To remove time zone information, use ``tz_localize(None)`` or ``tz_convert(None) Fold ~~~~ -.. versionadded:: 1.1.0 - For ambiguous times, pandas supports explicitly specifying the keyword-only fold argument. Due to daylight saving time, one wall clock time can occur twice when shifting from summer to winter time; fold describes whether the datetime-like corresponds diff --git a/doc/source/user_guide/visualization.rst b/doc/source/user_guide/visualization.rst index a7d7a09a6bcc5..1f19894479348 100644 --- a/doc/source/user_guide/visualization.rst +++ b/doc/source/user_guide/visualization.rst @@ -1209,8 +1209,6 @@ shown by default. Controlling the labels ~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 1.1.0 - You may set the ``xlabel`` and ``ylabel`` arguments to give the plot custom labels for x and y axis. By default, pandas will pick up index name as xlabel, while leaving it empty for ylabel. diff --git a/doc/source/user_guide/window.rst b/doc/source/user_guide/window.rst index 99e57cacca05a..72c631631ab62 100644 --- a/doc/source/user_guide/window.rst +++ b/doc/source/user_guide/window.rst @@ -237,8 +237,6 @@ from present information back to past information. This allows the rolling windo Custom window rolling ~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 1.0 - In addition to accepting an integer or offset as a ``window`` argument, ``rolling`` also accepts a ``BaseIndexer`` subclass that allows a user to define a custom method for calculating window bounds. The ``BaseIndexer`` subclass will need to define a ``get_window_bounds`` method that returns @@ -358,8 +356,6 @@ the windows are cast as :class:`Series` objects (``raw=False``) or ndarray objec Numba engine ~~~~~~~~~~~~ -.. versionadded:: 1.0 - Additionally, :meth:`~Rolling.apply` can leverage `Numba `__ if installed as an optional dependency. The apply aggregation can be executed using Numba by specifying ``engine='numba'`` and ``engine_kwargs`` arguments (``raw`` must also be set to ``True``). @@ -593,8 +589,6 @@ and **alpha** to the EW functions: one half. * **Alpha** specifies the smoothing factor directly. -.. versionadded:: 1.1.0 - You can also specify ``halflife`` in terms of a timedelta convertible unit to specify the amount of time it takes for an observation to decay to half its value when also specifying a sequence of ``times``. diff --git a/pandas/_libs/testing.pyx b/pandas/_libs/testing.pyx index 19aa4e173215e..2f3bb566cbcb0 100644 --- a/pandas/_libs/testing.pyx +++ b/pandas/_libs/testing.pyx @@ -59,12 +59,8 @@ cpdef assert_almost_equal(a, b, b : object rtol : float, default 1e-5 Relative tolerance. - - .. versionadded:: 1.1.0 atol : float, default 1e-8 Absolute tolerance. - - .. versionadded:: 1.1.0 check_dtype: bool, default True check dtype if both a and b are np.ndarray. obj : str, default None @@ -80,8 +76,6 @@ cpdef assert_almost_equal(a, b, Specify shared index values of objects being compared, internally used to show appropriate assertion message. - .. versionadded:: 1.1.0 - """ cdef: double diff = 0.0 diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index 3e1554e8b79b3..27ff719b1a143 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -1302,8 +1302,6 @@ class Timestamp(_Timestamp): datetime-like corresponds to the first (0) or the second time (1) the wall clock hits the ambiguous time. - .. versionadded:: 1.1.0 - Notes ----- There are essentially three calling conventions for the constructor. The diff --git a/pandas/_testing/asserters.py b/pandas/_testing/asserters.py index c0d1f1eba9e09..02bd91d90362c 100644 --- a/pandas/_testing/asserters.py +++ b/pandas/_testing/asserters.py @@ -85,12 +85,8 @@ def assert_almost_equal( equivalent when doing type checking. rtol : float, default 1e-5 Relative tolerance. - - .. versionadded:: 1.1.0 atol : float, default 1e-8 Absolute tolerance. - - .. versionadded:: 1.1.0 """ if isinstance(left, Index): assert_index_equal( @@ -217,12 +213,8 @@ def assert_index_equal( .. versionadded:: 1.2.0 rtol : float, default 1e-5 Relative tolerance. Only used when check_exact is False. - - .. versionadded:: 1.1.0 atol : float, default 1e-8 Absolute tolerance. Only used when check_exact is False. - - .. versionadded:: 1.1.0 obj : str, default 'Index' Specify object name being compared, internally used to show appropriate assertion message. @@ -711,12 +703,8 @@ def assert_extension_array_equal( Whether to compare number exactly. rtol : float, default 1e-5 Relative tolerance. Only used when check_exact is False. - - .. versionadded:: 1.1.0 atol : float, default 1e-8 Absolute tolerance. Only used when check_exact is False. - - .. versionadded:: 1.1.0 obj : str, default 'ExtensionArray' Specify object name being compared, internally used to show appropriate assertion message. @@ -842,12 +830,8 @@ def assert_series_equal( Whether to compare internal Categorical exactly. check_category_order : bool, default True Whether to compare category order of internal Categoricals. - - .. versionadded:: 1.0.2 check_freq : bool, default True Whether to check the `freq` attribute on a DatetimeIndex or TimedeltaIndex. - - .. versionadded:: 1.1.0 check_flags : bool, default True Whether to check the `flags` attribute. @@ -855,12 +839,8 @@ def assert_series_equal( rtol : float, default 1e-5 Relative tolerance. Only used when check_exact is False. - - .. versionadded:: 1.1.0 atol : float, default 1e-8 Absolute tolerance. Only used when check_exact is False. - - .. versionadded:: 1.1.0 obj : str, default 'Series' Specify object name being compared, internally used to show appropriate assertion message. @@ -1111,18 +1091,12 @@ def assert_frame_equal( (same as in columns) - same labels must be with the same data. check_freq : bool, default True Whether to check the `freq` attribute on a DatetimeIndex or TimedeltaIndex. - - .. versionadded:: 1.1.0 check_flags : bool, default True Whether to check the `flags` attribute. rtol : float, default 1e-5 Relative tolerance. Only used when check_exact is False. - - .. versionadded:: 1.1.0 atol : float, default 1e-8 Absolute tolerance. Only used when check_exact is False. - - .. versionadded:: 1.1.0 obj : str, default 'DataFrame' Specify object name being compared, internally used to show appropriate assertion message. diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index a765f4ae1b21b..df6ab2acc7f6b 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -1350,8 +1350,6 @@ def isocalendar(self) -> DataFrame: """ Calculate year, week, and day according to the ISO 8601 standard. - .. versionadded:: 1.1.0 - Returns ------- DataFrame diff --git a/pandas/core/common.py b/pandas/core/common.py index 6b7a0214925df..da99b72d60302 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -439,11 +439,6 @@ def random_state(state: RandomState | None = None): If receives `None`, returns np.random. If receives anything else, raises an informative ValueError. - .. versionchanged:: 1.1.0 - - array-like and BitGenerator object now passed to np.random.RandomState() - as seed - Default None. Returns diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 051ebfff47f83..ca14da18b3d15 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -1801,8 +1801,6 @@ def to_numpy( The value to use for missing values. The default value depends on `dtype` and the dtypes of the DataFrame columns. - .. versionadded:: 1.1.0 - Returns ------- numpy.ndarray @@ -2612,8 +2610,6 @@ def to_stata( 8 characters and values are repeated. {compression_options} - .. versionadded:: 1.1.0 - .. versionchanged:: 1.4.0 Zstandard support. {storage_options} @@ -2709,8 +2705,6 @@ def to_feather(self, path: FilePath | WriteBuffer[bytes], **kwargs) -> None: This includes the `compression`, `compression_level`, `chunksize` and `version` keywords. - .. versionadded:: 1.1.0 - Notes ----- This function writes the dataframe as a `feather file @@ -3109,8 +3103,6 @@ def to_html( Convert URLs to HTML links. encoding : str, default "utf-8" Set character encoding. - - .. versionadded:: 1.0 %(returns)s See Also -------- @@ -6606,8 +6598,6 @@ def sort_values( ``Series`` and return a Series with the same shape as the input. It will be applied to each column in `by` independently. - .. versionadded:: 1.1.0 - Returns ------- DataFrame or None @@ -6895,8 +6885,6 @@ def sort_index( ``Index`` and return an ``Index`` of the same shape. For MultiIndex inputs, the key is applied *per level*. - .. versionadded:: 1.1.0 - Returns ------- DataFrame or None @@ -6965,8 +6953,6 @@ def value_counts( """ Return a Series containing counts of unique rows in the DataFrame. - .. versionadded:: 1.1.0 - Parameters ---------- subset : label or list of labels, optional @@ -8686,16 +8672,8 @@ def groupby( ----------%s columns : str or object or a list of str Column to use to make new frame's columns. - - .. versionchanged:: 1.1.0 - Also accept list of columns names. - index : str or object or a list of str, optional Column to use to make new frame's index. If not given, uses existing index. - - .. versionchanged:: 1.1.0 - Also accept list of index names. - values : str, object or a list of the previous, optional Column(s) to use for populating new frame's values. If not specified, all remaining columns will be used and the result will @@ -9197,8 +9175,6 @@ def explode( ignore_index : bool, default False If True, the resulting index will be labeled 0, 1, …, n - 1. - .. versionadded:: 1.1.0 - Returns ------- DataFrame @@ -10523,8 +10499,6 @@ def cov( is ``N - ddof``, where ``N`` represents the number of elements. This argument is applicable only when no ``nan`` is in the dataframe. - .. versionadded:: 1.1.0 - numeric_only : bool, default False Include only `float`, `int` or `boolean` data. diff --git a/pandas/core/generic.py b/pandas/core/generic.py index f3de296841510..855ebd1bfba7d 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -3679,14 +3679,10 @@ def to_csv( is a non-binary file object. {compression_options} - .. versionchanged:: 1.0.0 - - May now be a dict with key 'method' as compression mode + May be a dict with key 'method' as compression mode and other entries as additional compression options if compression mode is 'zip'. - .. versionchanged:: 1.1.0 - Passing compression options as keys in dict is supported for compression modes 'gzip', 'bz2', 'zstd', and 'zip'. @@ -3733,8 +3729,6 @@ def to_csv( See the errors argument for :func:`open` for a full list of options. - .. versionadded:: 1.1.0 - {storage_options} .. versionadded:: 1.2.0 @@ -4939,8 +4933,6 @@ def sort_values( ``Series`` and return a Series with the same shape as the input. It will be applied to each column in `by` independently. - .. versionadded:: 1.1.0 - Returns ------- DataFrame or None @@ -5808,11 +5800,6 @@ def sample( If int, array-like, or BitGenerator, seed for random number generator. If np.random.RandomState or np.random.Generator, use as given. - .. versionchanged:: 1.1.0 - - array-like and BitGenerator object now passed to np.random.RandomState() - as seed - .. versionchanged:: 1.4.0 np.random.Generator objects now accepted @@ -7597,11 +7584,10 @@ def interpolate( * If 'method' is 'backfill' or 'bfill', the default is 'backward' * else the default is 'forward' - .. versionchanged:: 1.1.0 - raises ValueError if `limit_direction` is 'forward' or 'both' and - method is 'backfill' or 'bfill'. - raises ValueError if `limit_direction` is 'backward' or 'both' and - method is 'pad' or 'ffill'. + raises ValueError if `limit_direction` is 'forward' or 'both' and + method is 'backfill' or 'bfill'. + raises ValueError if `limit_direction` is 'backward' or 'both' and + method is 'pad' or 'ffill'. limit_area : {{`None`, 'inside', 'outside'}}, default None If limit is specified, consecutive NaNs will be filled with this @@ -8692,8 +8678,6 @@ def resample( - 'start': `origin` is the first value of the timeseries - 'start_day': `origin` is the first day at midnight of the timeseries - .. versionadded:: 1.1.0 - - 'end': `origin` is the last value of the timeseries - 'end_day': `origin` is the ceiling midnight of the last day @@ -8702,8 +8686,6 @@ def resample( offset : Timedelta or str, default is None An offset timedelta added to the origin. - .. versionadded:: 1.1.0 - group_keys : bool, default False Whether to include the group keys in the result index when using ``.apply()`` on the resampled object. @@ -10274,8 +10256,6 @@ def shift( For datetime, timedelta, or period data, etc. :attr:`NaT` is used. For extension dtypes, ``self.dtype.na_value`` is used. - .. versionchanged:: 1.1.0 - Returns ------- {klass} diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 50b39ee977ed4..3ee05b8c421dc 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -417,8 +417,6 @@ class providing the base-class of operations. If a string is chosen, then it needs to be the name of the groupby method you want to use. - - .. versionchanged:: 1.1.0 *args Positional arguments to pass to func. engine : str, default None @@ -426,7 +424,6 @@ class providing the base-class of operations. * ``'numba'`` : Runs the function through JIT compiled code from numba. * ``None`` : Defaults to ``'cython'`` or the global setting ``compute.use_numba`` - .. versionadded:: 1.1.0 engine_kwargs : dict, default None * For ``'cython'`` engine, there are no accepted ``engine_kwargs`` * For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil`` @@ -435,7 +432,6 @@ class providing the base-class of operations. ``{'nopython': True, 'nogil': False, 'parallel': False}`` and will be applied to the function - .. versionadded:: 1.1.0 **kwargs Keyword arguments to be passed into func. @@ -508,17 +504,15 @@ class providing the base-class of operations. column is keyword, whereas the value determines the aggregation used to compute the values in the column. - .. versionchanged:: 1.1.0 - - Can also accept a Numba JIT function with - ``engine='numba'`` specified. Only passing a single function is supported - with this engine. + Can also accept a Numba JIT function with + ``engine='numba'`` specified. Only passing a single function is supported + with this engine. - If the ``'numba'`` engine is chosen, the function must be - a user defined function with ``values`` and ``index`` as the - first and second arguments respectively in the function signature. - Each group's index will be passed to the user defined function - and optionally available for use. + If the ``'numba'`` engine is chosen, the function must be + a user defined function with ``values`` and ``index`` as the + first and second arguments respectively in the function signature. + Each group's index will be passed to the user defined function + and optionally available for use. .. deprecated:: 2.1.0 @@ -531,7 +525,6 @@ class providing the base-class of operations. * ``'numba'`` : Runs the function through JIT compiled code from numba. * ``None`` : Defaults to ``'cython'`` or globally setting ``compute.use_numba`` - .. versionadded:: 1.1.0 engine_kwargs : dict, default None * For ``'cython'`` engine, there are no accepted ``engine_kwargs`` * For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil`` @@ -540,7 +533,6 @@ class providing the base-class of operations. ``{{'nopython': True, 'nogil': False, 'parallel': False}}`` and will be applied to the function - .. versionadded:: 1.1.0 **kwargs * If ``func`` is None, ``**kwargs`` are used to define the output names and aggregations via Named Aggregation. See ``func`` entry. @@ -595,17 +587,15 @@ class providing the base-class of operations. column is keyword, whereas the value determines the aggregation used to compute the values in the column. - .. versionchanged:: 1.1.0 + Can also accept a Numba JIT function with + ``engine='numba'`` specified. Only passing a single function is supported + with this engine. - Can also accept a Numba JIT function with - ``engine='numba'`` specified. Only passing a single function is supported - with this engine. - - If the ``'numba'`` engine is chosen, the function must be - a user defined function with ``values`` and ``index`` as the - first and second arguments respectively in the function signature. - Each group's index will be passed to the user defined function - and optionally available for use. + If the ``'numba'`` engine is chosen, the function must be + a user defined function with ``values`` and ``index`` as the + first and second arguments respectively in the function signature. + Each group's index will be passed to the user defined function + and optionally available for use. *args Positional arguments to pass to func. @@ -614,7 +604,6 @@ class providing the base-class of operations. * ``'numba'`` : Runs the function through JIT compiled code from numba. * ``None`` : Defaults to ``'cython'`` or globally setting ``compute.use_numba`` - .. versionadded:: 1.1.0 engine_kwargs : dict, default None * For ``'cython'`` engine, there are no accepted ``engine_kwargs`` * For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil`` @@ -623,7 +612,6 @@ class providing the base-class of operations. ``{{'nopython': True, 'nogil': False, 'parallel': False}}`` and will be applied to the function - .. versionadded:: 1.1.0 **kwargs * If ``func`` is None, ``**kwargs`` are used to define the output names and aggregations via Named Aggregation. See ``func`` entry. @@ -4170,8 +4158,6 @@ def sample( You can use `random_state` for reproducibility. - .. versionadded:: 1.1.0 - Parameters ---------- n : int, optional diff --git a/pandas/core/groupby/grouper.py b/pandas/core/groupby/grouper.py index 13f43c1bf64a3..e9833a41e2795 100644 --- a/pandas/core/groupby/grouper.py +++ b/pandas/core/groupby/grouper.py @@ -99,8 +99,6 @@ class Grouper: - 'start': `origin` is the first value of the timeseries - 'start_day': `origin` is the first day at midnight of the timeseries - .. versionadded:: 1.1.0 - - 'end': `origin` is the last value of the timeseries - 'end_day': `origin` is the ceiling midnight of the last day @@ -109,8 +107,6 @@ class Grouper: offset : Timedelta or str, default is None An offset timedelta added to the origin. - .. versionadded:: 1.1.0 - dropna : bool, default True If True, and if group keys contain NA values, NA values together with row/column will be dropped. If False, NA values will also be treated as diff --git a/pandas/core/indexes/accessors.py b/pandas/core/indexes/accessors.py index f86728ad8b686..3ddc8aaf02d97 100644 --- a/pandas/core/indexes/accessors.py +++ b/pandas/core/indexes/accessors.py @@ -369,8 +369,6 @@ def isocalendar(self) -> DataFrame: """ Calculate year, week, and day according to the ISO 8601 standard. - .. versionadded:: 1.1.0 - Returns ------- DataFrame diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 694f2201d9f34..bb2355df4b303 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -5604,8 +5604,6 @@ def sort_values( this `key` function should be *vectorized*. It should expect an ``Index`` and return an ``Index`` of the same shape. - .. versionadded:: 1.1.0 - Returns ------- sorted_index : pandas.Index diff --git a/pandas/core/resample.py b/pandas/core/resample.py index 7a39891f74523..bde8a96e0daf3 100644 --- a/pandas/core/resample.py +++ b/pandas/core/resample.py @@ -908,7 +908,6 @@ def interpolate( * If 'method' is 'backfill' or 'bfill', the default is 'backward' * else the default is 'forward' - .. versionchanged:: 1.1.0 raises ValueError if `limit_direction` is 'forward' or 'both' and method is 'backfill' or 'bfill'. raises ValueError if `limit_direction` is 'backward' or 'both' and diff --git a/pandas/core/reshape/tile.py b/pandas/core/reshape/tile.py index 00d5059440536..357353ed38d46 100644 --- a/pandas/core/reshape/tile.py +++ b/pandas/core/reshape/tile.py @@ -114,8 +114,6 @@ def cut( the resulting categorical will be ordered. If False, the resulting categorical will be unordered (labels must be provided). - .. versionadded:: 1.1.0 - Returns ------- out : Categorical, Series, or ndarray diff --git a/pandas/core/series.py b/pandas/core/series.py index 96971736f113b..9693981cc5422 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1757,7 +1757,6 @@ def to_markdown( index : bool, optional, default True Add index (row) labels. - .. versionadded:: 1.1.0 {storage_options} .. versionadded:: 1.2.0 @@ -2721,8 +2720,6 @@ def cov( Delta degrees of freedom. The divisor used in calculations is ``N - ddof``, where ``N`` represents the number of elements. - .. versionadded:: 1.1.0 - Returns ------- float @@ -3396,8 +3393,6 @@ def sort_values( this `key` function should be *vectorized*. It should expect a ``Series`` and return an array-like. - .. versionadded:: 1.1.0 - Returns ------- Series or None @@ -3657,8 +3652,6 @@ def sort_index( this `key` function should be *vectorized*. It should expect an ``Index`` and return an ``Index`` of the same shape. - .. versionadded:: 1.1.0 - Returns ------- Series or None @@ -4118,8 +4111,6 @@ def explode(self, ignore_index: bool = False) -> Series: ignore_index : bool, default False If True, the resulting index will be labeled 0, 1, …, n - 1. - .. versionadded:: 1.1.0 - Returns ------- Series diff --git a/pandas/core/shared_docs.py b/pandas/core/shared_docs.py index 0e37ec5dc45f0..6281475b6926f 100644 --- a/pandas/core/shared_docs.py +++ b/pandas/core/shared_docs.py @@ -60,8 +60,6 @@ ] = """ Compare to another {klass} and show the differences. -.. versionadded:: 1.1.0 - Parameters ---------- other : {klass} @@ -175,8 +173,6 @@ with row/column will be dropped. If False, NA values will also be treated as the key in groups. - .. versionadded:: 1.1.0 - Returns ------- pandas.api.typing.%(klass)sGroupBy @@ -224,8 +220,6 @@ If True, original index is ignored. If False, the original index is retained. Index labels will be repeated as necessary. - .. versionadded:: 1.1.0 - Returns ------- DataFrame diff --git a/pandas/core/strings/accessor.py b/pandas/core/strings/accessor.py index ef9c685e618fb..6049002e3673d 100644 --- a/pandas/core/strings/accessor.py +++ b/pandas/core/strings/accessor.py @@ -1300,8 +1300,6 @@ def fullmatch(self, pat, case: bool = True, flags: int = 0, na=None): """ Determine if each string entirely matches a regular expression. - .. versionadded:: 1.1.0 - Parameters ---------- pat : str diff --git a/pandas/core/tools/timedeltas.py b/pandas/core/tools/timedeltas.py index 2e91927a002bb..ad366e58c2f06 100644 --- a/pandas/core/tools/timedeltas.py +++ b/pandas/core/tools/timedeltas.py @@ -116,10 +116,7 @@ def to_timedelta( * 'us' / 'microseconds' / 'microsecond' / 'micro' / 'micros' / 'U' * 'ns' / 'nanoseconds' / 'nano' / 'nanos' / 'nanosecond' / 'N' - .. versionchanged:: 1.1.0 - - Must not be specified when `arg` context strings and - ``errors="raise"``. + Must not be specified when `arg` context strings and ``errors="raise"``. errors : {'ignore', 'raise', 'coerce'}, default 'raise' - If 'raise', then invalid parsing will raise an exception. diff --git a/pandas/core/window/ewm.py b/pandas/core/window/ewm.py index 295a9ecac7fb8..42123fafd62aa 100644 --- a/pandas/core/window/ewm.py +++ b/pandas/core/window/ewm.py @@ -154,8 +154,6 @@ class ExponentialMovingWindow(BaseWindow): observation decays to half its value. Only applicable to ``mean()``, and halflife value will not apply to the other functions. - .. versionadded:: 1.1.0 - alpha : float, optional Specify smoothing factor :math:`\alpha` directly @@ -209,8 +207,6 @@ class ExponentialMovingWindow(BaseWindow): times : np.ndarray, Series, default None - .. versionadded:: 1.1.0 - Only applicable to ``mean()``. Times corresponding to the observations. Must be monotonically increasing and diff --git a/pandas/errors/__init__.py b/pandas/errors/__init__.py index c26b478338a55..d4bcc9cee7155 100644 --- a/pandas/errors/__init__.py +++ b/pandas/errors/__init__.py @@ -234,8 +234,6 @@ class DuplicateLabelError(ValueError): class InvalidIndexError(Exception): """ Exception raised when attempting to use an invalid index key. - - .. versionadded:: 1.1.0 """ diff --git a/pandas/io/common.py b/pandas/io/common.py index 02de416e5ce37..7cdb50c629d21 100644 --- a/pandas/io/common.py +++ b/pandas/io/common.py @@ -670,13 +670,11 @@ def get_handle( Encoding to use. {compression_options} - .. versionchanged:: 1.0.0 - May now be a dict with key 'method' as compression mode + May be a dict with key 'method' as compression mode and other keys as compression options if compression mode is 'zip'. - .. versionchanged:: 1.1.0 - Passing compression options as keys in dict is now + Passing compression options as keys in dict is supported for compression modes 'gzip', 'bz2', 'zstd' and 'zip'. .. versionchanged:: 1.4.0 Zstandard support. diff --git a/pandas/io/feather_format.py b/pandas/io/feather_format.py index 4d17173fa0ceb..28df235084cf5 100644 --- a/pandas/io/feather_format.py +++ b/pandas/io/feather_format.py @@ -49,7 +49,6 @@ def to_feather( **kwargs : Additional keywords passed to `pyarrow.feather.write_feather`. - .. versionadded:: 1.1.0 """ import_optional_dependency("pyarrow") from pyarrow import feather diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index e2c5ed2ea92b6..bbb295b49335c 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -3052,8 +3052,6 @@ def highlight_null( %(subset)s - .. versionadded:: 1.1.0 - %(props)s .. versionadded:: 1.3.0 diff --git a/pandas/io/gbq.py b/pandas/io/gbq.py index 286d2b187c700..597369bb12703 100644 --- a/pandas/io/gbq.py +++ b/pandas/io/gbq.py @@ -134,7 +134,6 @@ def read_gbq( If set, limit the maximum number of rows to fetch from the query results. - .. versionadded:: 1.1.0 progress_bar_type : Optional, str If set, use the `tqdm `__ library to display a progress bar while the data downloads. Install the diff --git a/pandas/io/parsers/readers.py b/pandas/io/parsers/readers.py index f1f44a71b9a3b..8b2a02f0ac63a 100644 --- a/pandas/io/parsers/readers.py +++ b/pandas/io/parsers/readers.py @@ -362,9 +362,9 @@ Specifies what to do upon encountering a bad line (a line with too many fields). Allowed values are : - - 'error', raise an Exception when a bad line is encountered. - - 'warn', raise a warning when a bad line is encountered and skip that line. - - 'skip', skip bad lines without raising or warning when they are encountered. + - 'error', raise an Exception when a bad line is encountered. + - 'warn', raise a warning when a bad line is encountered and skip that line. + - 'skip', skip bad lines without raising or warning when they are encountered. .. versionadded:: 1.3.0 diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 8de1aaacaf400..33ff24f5fc981 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -654,8 +654,6 @@ def keys(self, include: str = "pandas") -> list[str]: When kind equals 'pandas' return pandas objects. When kind equals 'native' return native HDF5 Table objects. - .. versionadded:: 1.1.0 - Returns ------- list @@ -1109,8 +1107,6 @@ def put( independent on creation time. dropna : bool, default False, optional Remove missing values. - - .. versionadded:: 1.1.0 """ if format is None: format = get_option("io.hdf.default_format") or "fixed" diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 3dddce98b35be..0492ba22dcf8a 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -2266,8 +2266,6 @@ class StataWriter(StataParser): Each label must be 80 characters or smaller. {compression_options} - .. versionadded:: 1.1.0 - .. versionchanged:: 1.4.0 Zstandard support. {storage_options} @@ -3195,8 +3193,6 @@ class StataWriter117(StataWriter): characters, and either frequently repeated or sparse. {compression_options} - .. versionadded:: 1.1.0 - .. versionchanged:: 1.4.0 Zstandard support. value_labels : dict of dicts @@ -3587,8 +3583,6 @@ class StataWriterUTF8(StataWriter117): for storing larger DataFrames. {compression_options} - .. versionadded:: 1.1.0 - .. versionchanged:: 1.4.0 Zstandard support. value_labels : dict of dicts diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 6ef33c3d58306..23e86d645b54d 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -87,8 +87,6 @@ def hist_series( legend : bool, default False Whether to show the legend. - .. versionadded:: 1.1.0 - **kwargs To be passed to the actual plotting function. @@ -197,8 +195,6 @@ def hist_frame( legend : bool, default False Whether to show the legend. - .. versionadded:: 1.1.0 - **kwargs All other plotting keyword arguments to be passed to :meth:`matplotlib.pyplot.hist`. @@ -448,8 +444,6 @@ def hist_frame( `b`, then passing {'a': 'green', 'b': 'red'} will color %(kind)ss for column `a` in green and %(kind)ss for column `b` in red. - .. versionadded:: 1.1.0 - **kwargs Additional keyword arguments are documented in :meth:`DataFrame.plot`. @@ -705,8 +699,6 @@ class PlotAccessor(PandasObject): Name to use for the xlabel on x-axis. Default uses index name as xlabel, or the x-column name for planar plots. - .. versionadded:: 1.1.0 - .. versionchanged:: 1.2.0 Now applicable to planar plots (`scatter`, `hexbin`). @@ -719,8 +711,6 @@ class PlotAccessor(PandasObject): Name to use for the ylabel on y-axis. Default will show no ylabel, or the y-column name for planar plots. - .. versionadded:: 1.1.0 - .. versionchanged:: 1.2.0 Now applicable to planar plots (`scatter`, `hexbin`). @@ -1637,8 +1627,6 @@ def scatter( recursively. For instance, when passing [2,14] all points size will be either 2 or 14, alternatively. - .. versionchanged:: 1.1.0 - c : str, int or array-like, optional The color of each point. Possible values are: