File tree 1 file changed +20
-3
lines changed
1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -28,20 +28,37 @@ 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
-------
37
40
is_number : bool
38
41
Whether `obj` is a number or not.
39
42
43
+ See Also
44
+ --------
45
+ pandas.api.types.is_integer: checks a subgroup of numbers
46
+
40
47
Examples
41
48
--------
42
- >>> is_number(1)
49
+ >>> pd.api.types.is_number(1)
50
+ True
51
+ >>> pd.api.types.is_number(7.15)
43
52
True
44
- >>> is_number("foo")
53
+
54
+ Booleans are valid because they are int subclass.
55
+
56
+ >>> pd.api.types.is_number(False)
57
+ True
58
+
59
+ >>> pd.api.types.is_number("foo")
60
+ False
61
+ >>> pd.api.types.is_number("5")
45
62
False
46
63
"""
47
64
You can’t perform that action at this time.
0 commit comments