pandas 1.4.2

ParametersReturns
convert_dtypes(input_array: 'ArrayLike', convert_string: 'bool' = True, convert_integer: 'bool' = True, convert_boolean: 'bool' = True, convert_floating: 'bool' = True) -> 'DtypeObj'

Parameters

input_array : ExtensionArray or np.ndarray
convert_string : bool, default True

Whether object dtypes should be converted to StringDtype() .

convert_integer : bool, default True

Whether, if possible, conversion can be done to integer extension types.

convert_boolean : bool, defaults True

Whether object dtypes should be converted to BooleanDtypes() .

convert_floating : bool, defaults True

Whether, if possible, conversion can be done to floating extension types. If :None:None:`convert_integer` is also True, preference will be give to integer dtypes if the floats can be faithfully casted to integers.

Returns

np.dtype, or ExtensionDtype

Convert objects to best possible type, and optionally, to types supporting pd.NA .

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/core/dtypes/cast.py#1364
type: <class 'function'>
Commit: