Skip to content

DOC: Remove versionadded/changed for 1.1.0 #52905

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
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions doc/source/development/contributing_codebase.rst
Original file line number Diff line number Diff line change
Expand Up @@ -959,9 +959,9 @@ directive is used. The sphinx syntax for that is:

.. code-block:: rst

.. versionadded:: 1.1.0
Copy link
Member

Choose a reason for hiding this comment

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

I think we want to keep this as an example of how to add this sphinx syntax. Might be good to just update the version (and the sentence below)

Copy link
Member

Choose a reason for hiding this comment

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

agreed, like 2.1.0 (and update the "This will put the text New in version 1.1.0" text below)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, should have read in more detail

.. 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 <https://github.com/pandas-dev/pandas/blob/v0.20.2/pandas/core/frame.py#L1495>`__)
or a new keyword argument (`example <https://github.com/pandas-dev/pandas/blob/v0.20.2/pandas/core/generic.py#L568>`__).
6 changes: 0 additions & 6 deletions doc/source/user_guide/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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``.
Expand Down Expand Up @@ -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.

Expand Down
2 changes: 0 additions & 2 deletions doc/source/user_guide/boolean.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 0 additions & 2 deletions doc/source/user_guide/dsintro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.python.org/dev/peps/pep-0557>`__,
can be passed into the DataFrame constructor.
Passing a list of dataclasses is equivalent to passing a list of dictionaries.
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 @@ -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
^^^^^^^^^^^^^^

Expand Down
2 changes: 0 additions & 2 deletions doc/source/user_guide/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 0 additions & 3 deletions doc/source/user_guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``.
Copy link
Member

Choose a reason for hiding this comment

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

is the idea to do 1.2.0 separately?

Copy link
Member Author

Choose a reason for hiding this comment

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

There was pushback when I suggested removing everything up to 1.4

Copy link
Member

Choose a reason for hiding this comment

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

I'm good with going up to, but not including, 1.3. That seemed to be the consensus in #51071 to me (note @lithomas1 first said up to 1.1, then up to 1.3.5 after).

Looking at the last 30 days of downloads, 1.3.5 is at 18% whereas 1.2.5 is at 5%.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do as follow up.

thousands : str, default ``None``
Thousands separator.
Expand Down Expand Up @@ -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
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 @@ -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")])
Expand Down
4 changes: 0 additions & 4 deletions doc/source/user_guide/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -666,8 +664,6 @@ Or whether elements match a pattern:
dtype="string",
).str.match(pattern)

.. versionadded:: 1.1.0

.. ipython:: python

pd.Series(
Expand Down
8 changes: 0 additions & 8 deletions doc/source/user_guide/timeseries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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<basics.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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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 <timeseries.partialindexing>`.

.. ipython:: python
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions doc/source/user_guide/visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 0 additions & 6 deletions doc/source/user_guide/window.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <https://numba.pydata.org/>`__
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``).
Expand Down Expand Up @@ -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``.
Expand Down
6 changes: 0 additions & 6 deletions pandas/_libs/testing.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
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 @@ -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
Expand Down
26 changes: 0 additions & 26 deletions pandas/_testing/asserters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -842,25 +830,17 @@ 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.

.. 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 'Series'
Specify object name being compared, internally used to show appropriate
assertion message.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions pandas/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading