File tree 1 file changed +13
-6
lines changed
1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,12 @@ def is_number(obj):
28
28
"""
29
29
Check if the object is a number.
30
30
31
+ Returns True when the object is a number, and False if is not.
32
+
31
33
Parameters
32
34
----------
33
- obj : The object to check.
35
+ obj : any type
36
+ The object to check if is a number.
34
37
35
38
Returns
36
39
-------
@@ -43,15 +46,19 @@ def is_number(obj):
43
46
44
47
Examples
45
48
--------
46
- >>> is_number(1)
49
+ >>> pd.api.types. is_number(1)
47
50
True
48
- >>> is_number(7.15)
51
+ >>> pd.api.types. is_number(7.15)
49
52
True
50
- >>> is_number(False)
53
+
54
+ Booleans are valid because they are int subclass.
55
+
56
+ >>> pd.api.types.is_number(False)
51
57
True
52
- >>> is_number("foo")
58
+
59
+ >>> pd.api.types.is_number("foo")
53
60
False
54
- >>> is_number("5")
61
+ >>> pd.api.types. is_number("5")
55
62
False
56
63
"""
57
64
You can’t perform that action at this time.
0 commit comments