Skip to content

DOC: More doc fix for dtype_backend #59071

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 20 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
8 changes: 3 additions & 5 deletions pandas/core/dtypes/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -1012,12 +1012,10 @@ def convert_dtypes(
object array contains pd.NA.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If specified, the behavior is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down
10 changes: 4 additions & 6 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -6652,13 +6652,11 @@ def convert_dtypes(
If `convert_integer` is also True, preference will be give to integer
dtypes if the floats can be faithfully casted to integers.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
Back-end data type applied to the resultant :class:`DataFrame` or
:class:`Series` (still experimental). Behaviour is as follows:
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). If specified, the behavior is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
or :class:`Series` (default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame or Series.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down
12 changes: 6 additions & 6 deletions pandas/io/clipboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ def read_clipboard(
A string or regex delimiter. The default of ``'\\s+'`` denotes
one or more whitespace characters.

dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
dtype_backend : {'numpy_nullable', 'pyarrow'}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down
24 changes: 12 additions & 12 deletions pandas/io/excel/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,14 @@
Rows at the end to skip (0-indexed).
{storage_options}

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
dtype_backend : {{'numpy_nullable', 'pyarrow'}}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down Expand Up @@ -1728,14 +1728,14 @@ def parse(
comment string and the end of the current line is ignored.
skipfooter : int, default 0
Rows at the end to skip (0-indexed).
dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
dtype_backend : {{'numpy_nullable', 'pyarrow'}}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0
**kwds : dict, optional
Expand Down
12 changes: 6 additions & 6 deletions pandas/io/feather_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ def read_feather(
Whether to parallelize reading using multiple threads.
{storage_options}

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
dtype_backend : {{'numpy_nullable', 'pyarrow'}}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down
12 changes: 6 additions & 6 deletions pandas/io/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,14 +1131,14 @@ def read_html(

.. versionadded:: 1.5.0

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
dtype_backend : {{'numpy_nullable', 'pyarrow'}}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down
12 changes: 6 additions & 6 deletions pandas/io/json/_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,14 +649,14 @@ def read_json(

{storage_options}

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
dtype_backend : {{'numpy_nullable', 'pyarrow'}}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down
12 changes: 6 additions & 6 deletions pandas/io/orc.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ def read_orc(
Output always follows the ordering of the file and not the columns list.
This mirrors the original behaviour of
:external+pyarrow:py:meth:`pyarrow.orc.ORCFile.read`.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
dtype_backend : {'numpy_nullable', 'pyarrow'}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down
12 changes: 6 additions & 6 deletions pandas/io/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,14 +542,14 @@ def read_parquet(

.. versionadded:: 1.3.0

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
dtype_backend : {{'numpy_nullable', 'pyarrow'}}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down
12 changes: 6 additions & 6 deletions pandas/io/parsers/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,14 +443,14 @@ class _read_shared(TypedDict, Generic[HashableT], total=False):

{storage_options}

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
dtype_backend : {{'numpy_nullable', 'pyarrow'}}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down
12 changes: 6 additions & 6 deletions pandas/io/spss.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ def read_spss(
Return a subset of the columns. If None, return all columns.
convert_categoricals : bool, default is True
Convert categorical columns into pd.Categorical.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
dtype_backend : {'numpy_nullable', 'pyarrow'}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down
60 changes: 30 additions & 30 deletions pandas/io/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,14 @@ def read_sql_table(
chunksize : int, default None
If specified, returns an iterator where `chunksize` is the number of
rows to include in each chunk.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
dtype_backend : {'numpy_nullable', 'pyarrow'}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down Expand Up @@ -443,14 +443,14 @@ def read_sql_query(
{'a': np.float64, 'b': np.int32, 'c': 'Int64'}.

.. versionadded:: 1.3.0
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
dtype_backend : {'numpy_nullable', 'pyarrow'}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down Expand Up @@ -586,14 +586,14 @@ def read_sql(
chunksize : int, default None
If specified, return an iterator where `chunksize` is the
number of rows to include in each chunk.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
dtype_backend : {'numpy_nullable', 'pyarrow'}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0
dtype : Type name or dict of columns
Expand Down Expand Up @@ -1683,14 +1683,14 @@ def read_table(
chunksize : int, default None
If specified, return an iterator where `chunksize` is the number
of rows to include in each chunk.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
dtype_backend : {'numpy_nullable', 'pyarrow'}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down Expand Up @@ -2148,14 +2148,14 @@ def read_table(
schema of the SQL database object.
chunksize : int, default None
Raises NotImplementedError
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
dtype_backend : {'numpy_nullable', 'pyarrow'}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down
12 changes: 6 additions & 6 deletions pandas/io/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,14 +959,14 @@ def read_xml(

{storage_options}

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
dtype_backend : {{'numpy_nullable', 'pyarrow'}}
Back-end data type applied to the resultant :class:`DataFrame`
(still experimental). Behaviour is as follows:
(still experimental). If not specified, the default behavior
is to not use nullable data types. If specified, the behavior
is as follows:

* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
(default).
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
DataFrame.
* ``"numpy_nullable"``: returns with nullable-dtype-backed
* ``"pyarrow"``: returns with pyarrow-backed nullable :class:`ArrowDtype`

.. versionadded:: 2.0

Expand Down
Loading