pandas.api.types.is_number(obj)
[source]
Check if the object is a number.
Returns True when the object is a number, and False if is not.
Parameters: |
|
---|---|
Returns: |
|
See also
api.types.is_integer
>>> pd.api.types.is_number(1) True >>> pd.api.types.is_number(7.15) True
Booleans are valid because they are int subclass.
>>> pd.api.types.is_number(False) True
>>> pd.api.types.is_number("foo") False >>> pd.api.types.is_number("5") False
© 2008–2012, 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/0.25.0/reference/api/pandas.api.types.is_number.html