Skip to content
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

DOC: Remove 1.2 versionadded and changed #56544

Merged
merged 1 commit into from
Dec 18, 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
5 changes: 0 additions & 5 deletions pandas/_testing/asserters.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ def assert_index_equal(
Whether to compare the order of index entries as well as their values.
If True, both indexes must contain the same elements, in the same order.
If False, both indexes must contain the same elements, but in any order.

.. versionadded:: 1.2.0
rtol : float, default 1e-5
Relative tolerance. Only used when check_exact is False.
atol : float, default 1e-8
Expand Down Expand Up @@ -853,9 +851,6 @@ def assert_series_equal(
Whether to check the `freq` attribute on a DatetimeIndex or TimedeltaIndex.
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.
atol : float, default 1e-8
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/arrays/floating.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ class FloatingArray(NumericArray):
"""
Array of floating (optional missing) values.

.. versionadded:: 1.2.0

.. warning::

FloatingArray is currently experimental, and its API or internal
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/arrays/string_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ class ArrowStringArray(ObjectStringArrayMixin, ArrowExtensionArray, BaseStringAr
"""
Extension array for string data in a ``pyarrow.ChunkedArray``.

.. versionadded:: 1.2.0

.. warning::

ArrowStringArray is considered experimental. The implementation and
Expand Down
6 changes: 0 additions & 6 deletions pandas/core/construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@ def array(
``pd.options.mode.string_storage`` if the dtype is not explicitly given.

For all other cases, NumPy's usual inference rules will be used.

.. versionchanged:: 1.2.0

Pandas now also infers nullable-floating dtype for float-like
input data

copy : bool, default True
Whether to copy the data, even if not necessary. Depending
on the type of `data`, creating the new array may require
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ class Flags:
"""
Flags that apply to pandas objects.

.. versionadded:: 1.2.0

Parameters
----------
obj : Series or DataFrame
Expand Down
15 changes: 0 additions & 15 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,6 @@
join; preserve the order of the left keys.
* cross: creates the cartesian product from both frames, preserves the order
of the left keys.

.. versionadded:: 1.2.0

on : label or list
Column or index level names to join on. These must be found in both
DataFrames. If `on` is None and not merging on indexes then this defaults
Expand Down Expand Up @@ -2780,8 +2777,6 @@ def to_stata(

{storage_options}

.. versionadded:: 1.2.0

value_labels : dict of dicts
Dictionary containing columns as keys and dictionaries of column value
to labels as values. Labels for a single variable must be 32,000
Expand Down Expand Up @@ -2994,11 +2989,6 @@ def to_parquet(
object implementing a binary ``write()`` function. If None, the result is
returned as bytes. If a string or path, it will be used as Root Directory
path when writing a partitioned dataset.

.. versionchanged:: 1.2.0

Previously this was "fname"

engine : {{'auto', 'pyarrow', 'fastparquet'}}, default 'auto'
Parquet library to use. If 'auto', then the option
``io.parquet.engine`` is used. The default ``io.parquet.engine``
Expand All @@ -3021,8 +3011,6 @@ def to_parquet(
Must be None if path is not a string.
{storage_options}

.. versionadded:: 1.2.0

**kwargs
Additional arguments passed to the parquet library. See
:ref:`pandas io <io.parquet>` for more details.
Expand Down Expand Up @@ -10564,9 +10552,6 @@ def join(
of the calling's one.
* cross: creates the cartesian product from both frames, preserves the order
of the left keys.

.. versionadded:: 1.2.0

lsuffix : str, default ''
Suffix to use from left frame's overlapping columns.
rsuffix : str, default ''
Expand Down
37 changes: 0 additions & 37 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2522,8 +2522,6 @@ def to_json(

{storage_options}

.. versionadded:: 1.2.0

mode : str, default 'w' (writing)
Specify the IO mode for output when supplying a path_or_buf.
Accepted args are 'w' (writing) and 'a' (append) only.
Expand Down Expand Up @@ -3128,8 +3126,6 @@ def to_pickle(

{storage_options}

.. versionadded:: 1.2.0

See Also
--------
read_pickle : Load pickled pandas object (or any object) from file.
Expand Down Expand Up @@ -3417,9 +3413,6 @@ def to_latex(
into a main LaTeX document or read from an external file
with ``\input{{table.tex}}``.

.. versionchanged:: 1.2.0
Added position argument, changed meaning of caption argument.

.. versionchanged:: 2.0.0
Refactored to use the Styler implementation via jinja2 templating.

Expand Down Expand Up @@ -3510,10 +3503,6 @@ def to_latex(
Tuple (full_caption, short_caption),
which results in ``\caption[short_caption]{{full_caption}}``;
if a single string is passed, no short caption will be set.

.. versionchanged:: 1.2.0
Optionally allow caption to be a tuple ``(full_caption, short_caption)``.

label : str, optional
The LaTeX label to be placed inside ``\label{{}}`` in the output.
This is used with ``\ref{{}}`` in the main ``.tex`` file.
Expand All @@ -3522,8 +3511,6 @@ def to_latex(
The LaTeX positional argument for tables, to be placed after
``\begin{{}}`` in the output.

.. versionadded:: 1.2.0

Returns
-------
str or None
Expand Down Expand Up @@ -3844,11 +3831,6 @@ def to_csv(
returned as a string. If a non-binary file object is passed, it should
be opened with `newline=''`, disabling universal newlines. If a binary
file object is passed, `mode` might need to contain a `'b'`.

.. versionchanged:: 1.2.0

Support for binary file objects was introduced.

sep : str, default ','
String of length 1. Field delimiter for the output file.
na_rep : str, default ''
Expand Down Expand Up @@ -3889,17 +3871,6 @@ def to_csv(

Passing compression options as keys in dict is
supported for compression modes 'gzip', 'bz2', 'zstd', and 'zip'.

.. versionchanged:: 1.2.0

Compression is supported for binary file objects.

.. versionchanged:: 1.2.0

Previous versions forwarded dict entries for 'gzip' to
`gzip.open` instead of `gzip.GzipFile` which prevented
setting `mtime`.

quoting : optional constant from csv module
Defaults to csv.QUOTE_MINIMAL. If you have set a `float_format`
then floats are converted to strings and thus csv.QUOTE_NONNUMERIC
Expand Down Expand Up @@ -3935,8 +3906,6 @@ def to_csv(

{storage_options}

.. versionadded:: 1.2.0

Returns
-------
None or str
Expand Down Expand Up @@ -6941,8 +6910,6 @@ def convert_dtypes(
Whether, if possible, conversion can be done to floating extension types.
If `convert_integer` is also True, preference will be give to integer
dtypes if the floats can be faithfully casted to integers.

.. versionadded:: 1.2.0
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
Expand Down Expand Up @@ -6986,10 +6953,6 @@ def convert_dtypes(
appropriate integer extension type. Otherwise, convert to an
appropriate floating extension type.

.. versionchanged:: 1.2
Starting with pandas 1.2, this method also converts float columns
to the nullable floating extension type.

In the future, as new dtypes are added that support ``pd.NA``, the results
of this method will change to support those new dtypes.

Expand Down
2 changes: 0 additions & 2 deletions pandas/core/groupby/grouper.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ class Grouper:
row/column will be dropped. If False, NA values will also be treated as
the key in groups.

.. versionadded:: 1.2.0

Returns
-------
Grouper or pandas.api.typing.TimeGrouper
Expand Down
3 changes: 0 additions & 3 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5814,9 +5814,6 @@ def sort_values(
na_position : {'first' or 'last'}, default 'last'
Argument 'first' puts NaNs at the beginning, 'last' puts NaNs at
the end.

.. versionadded:: 1.2.0

key : callable, optional
If not None, apply the key function to the index values
before sorting. This is similar to the `key` argument in the
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1920,8 +1920,6 @@ def to_markdown(

{storage_options}

.. versionadded:: 1.2.0

**kwargs
These parameters will be passed to `tabulate \
<https://pypi.org/project/tabulate>`_.
Expand Down
4 changes: 0 additions & 4 deletions pandas/core/window/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,10 +957,6 @@ class Window(BaseWindow):

Default ``None`` (``'right'``).

.. versionchanged:: 1.2.0

The closed parameter with fixed windows is now supported.

step : int, default None

.. versionadded:: 1.5.0
Expand Down
2 changes: 0 additions & 2 deletions pandas/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,6 @@ class DuplicateLabelError(ValueError):
"""
Error raised when an operation would introduce duplicate labels.

.. versionadded:: 1.2.0

Examples
--------
>>> s = pd.Series([0, 1, 2], index=['a', 'b', 'c']).set_flags(
Expand Down
7 changes: 1 addition & 6 deletions pandas/io/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,8 @@ def _get_filepath_or_buffer(

{storage_options}

.. versionadded:: 1.2.0

..versionchange:: 1.2.0

Returns the dataclass IOArgs.
Returns the dataclass IOArgs.
"""
filepath_or_buffer = stringify_path(filepath_or_buffer)

Expand Down Expand Up @@ -711,8 +708,6 @@ def get_handle(
storage_options: StorageOptions = None
Passed to _get_filepath_or_buffer

.. versionchanged:: 1.2.0

Returns the dataclass IOHandles
"""
# Windows does not default to utf-8. Set to utf-8 for a consistent behavior
Expand Down
4 changes: 0 additions & 4 deletions pandas/io/excel/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,6 @@
Rows at the end to skip (0-indexed).
{storage_options}

.. versionadded:: 1.2.0

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
Expand Down Expand Up @@ -971,8 +969,6 @@ class ExcelWriter(Generic[_WorkbookT]):
File mode to use (write or append). Append does not work with fsspec URLs.
{storage_options}

.. versionadded:: 1.2.0

if_sheet_exists : {{'error', 'new', 'replace', 'overlay'}}, default 'error'
How to behave when trying to write to a sheet that already
exists (append mode only).
Expand Down
5 changes: 0 additions & 5 deletions pandas/io/feather_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ def to_feather(
df : DataFrame
path : str, path object, or file-like object
{storage_options}

.. versionadded:: 1.2.0

**kwargs :
Additional keywords passed to `pyarrow.feather.write_feather`.

Expand Down Expand Up @@ -93,8 +90,6 @@ def read_feather(
Whether to parallelize reading using multiple threads.
{storage_options}

.. versionadded:: 1.2.0

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
Expand Down
1 change: 0 additions & 1 deletion pandas/io/formats/excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,6 @@ def write(

{storage_options}

.. versionadded:: 1.2.0
engine_kwargs: dict, optional
Arbitrary keyword arguments passed to excel engine.
"""
Expand Down
3 changes: 0 additions & 3 deletions pandas/io/formats/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@
floats. This function must return a unicode string and will be
applied only to the non-``NaN`` elements, with ``NaN`` being
handled by ``na_rep``.

.. versionchanged:: 1.2.0

sparsify : bool, optional, default True
Set to False for a DataFrame with a hierarchical index to print
every multiindex key at each row.
Expand Down
12 changes: 0 additions & 12 deletions pandas/io/formats/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,6 @@ class Styler(StylerRenderer):
uuid_len : int, default 5
If ``uuid`` is not specified, the length of the ``uuid`` to randomly generate
expressed in hex characters, in range [0, 32].

.. versionadded:: 1.2.0

decimal : str, optional
Character used as decimal separator for floats, complex and integers. If not
given uses ``pandas.options.styler.format.decimal``.
Expand Down Expand Up @@ -2517,23 +2514,14 @@ def set_table_styles(
in their respective tuple form. The dict values should be
a list as specified in the form with CSS selectors and
props that will be applied to the specified row or column.

.. versionchanged:: 1.2.0

axis : {0 or 'index', 1 or 'columns', None}, default 0
Apply to each column (``axis=0`` or ``'index'``), to each row
(``axis=1`` or ``'columns'``). Only used if `table_styles` is
dict.

.. versionadded:: 1.2.0

overwrite : bool, default True
Styles are replaced if `True`, or extended if `False`. CSS
rules are preserved so most recent styles set will dominate
if selectors intersect.

.. versionadded:: 1.2.0

css_class_names : dict, optional
A dict of strings used to replace the default CSS classes described below.

Expand Down
7 changes: 0 additions & 7 deletions pandas/io/json/_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,11 +648,6 @@ def read_json(
for more information on ``chunksize``.
This can only be passed if `lines=True`.
If this is None, the file will be read into memory all at once.

.. versionchanged:: 1.2

``JsonReader`` is a context manager.

{decompression_options}

.. versionchanged:: 1.4.0 Zstandard support.
Expand All @@ -664,8 +659,6 @@ def read_json(

{storage_options}

.. versionadded:: 1.2.0

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
Expand Down
Loading