pandas / 1.4.0 / reference / api / pandas.api.types.is_float_dtype.html /

pandas.api.types.is_float_dtype

pandas.api.types. is_float_dtype ( arr_or_dtype ) [source]

Check whether the provided array or dtype is of a float dtype.

This function is internal and should not be exposed in the public API.

Parameters
arr_or_dtype :array-like or dtype

The array or dtype to check.

Returns
boolean

Whether or not the array or dtype is of a float dtype.

Examples

>>> is_float_dtype(str)
False
>>> is_float_dtype(int)
False
>>> is_float_dtype(float)
True
>>> is_float_dtype(np.array(['a', 'b']))
False
>>> is_float_dtype(pd.Series([1, 2]))
False
>>> is_float_dtype(pd.Index([1, 2.]))
True

© 2008–2022, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.4.0/reference/api/pandas.api.types.is_float_dtype.html