Skip to content

Commit 644eadd

Browse files
Aloqeelypmhatre1
authored andcommitted
DOC: Improve convert_dtypes's docstring (pandas-dev#58558)
* DOC: Improve convert_dtypes's docstring * Make summary 1 line
1 parent 2843962 commit 644eadd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/core/generic.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -6622,7 +6622,7 @@ def convert_dtypes(
66226622
dtype_backend: DtypeBackend = "numpy_nullable",
66236623
) -> Self:
66246624
"""
6625-
Convert columns to the best possible dtypes using dtypes supporting ``pd.NA``.
6625+
Convert columns from numpy dtypes to the best dtypes that support ``pd.NA``.
66266626
66276627
Parameters
66286628
----------
@@ -6639,13 +6639,13 @@ def convert_dtypes(
66396639
If `convert_integer` is also True, preference will be give to integer
66406640
dtypes if the floats can be faithfully casted to integers.
66416641
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
6642-
Back-end data type applied to the resultant :class:`DataFrame`
6643-
(still experimental). Behaviour is as follows:
6642+
Back-end data type applied to the resultant :class:`DataFrame` or
6643+
:class:`Series` (still experimental). Behaviour is as follows:
66446644
66456645
* ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
6646-
(default).
6646+
or :class:`Series` (default).
66476647
* ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
6648-
DataFrame.
6648+
DataFrame or Series.
66496649
66506650
.. versionadded:: 2.0
66516651

0 commit comments

Comments
 (0)