We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc31e58 commit 344f1e0Copy full SHA for 344f1e0
pandas/core/dtypes/inference.py
@@ -28,9 +28,12 @@ def is_number(obj):
28
"""
29
Check if the object is a number.
30
31
+ Booleans are valid because they are int subclass.
32
+
33
Parameters
34
----------
- obj : The object to check.
35
+ obj : any type
36
+ The object to check if is a number.
37
38
Returns
39
-------
@@ -43,15 +46,15 @@ def is_number(obj):
43
46
44
47
Examples
45
48
--------
- >>> is_number(1)
49
+ >>> pd.api.types.is_number(1)
50
True
- >>> is_number(7.15)
51
+ >>> pd.api.types.is_number(7.15)
52
- >>> is_number(False)
53
+ >>> pd.api.types.is_number(False)
54
- >>> is_number("foo")
55
+ >>> pd.api.types.is_number("foo")
56
False
- >>> is_number("5")
57
+ >>> pd.api.types.is_number("5")
58
59
60
0 commit comments