Skip to content

Commit 344f1e0

Browse files
committed
Fix previously modified docstring
1 parent fc31e58 commit 344f1e0

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

pandas/core/dtypes/inference.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ def is_number(obj):
2828
"""
2929
Check if the object is a number.
3030
31+
Booleans are valid because they are int subclass.
32+
3133
Parameters
3234
----------
33-
obj : The object to check.
35+
obj : any type
36+
The object to check if is a number.
3437
3538
Returns
3639
-------
@@ -43,15 +46,15 @@ def is_number(obj):
4346
4447
Examples
4548
--------
46-
>>> is_number(1)
49+
>>> pd.api.types.is_number(1)
4750
True
48-
>>> is_number(7.15)
51+
>>> pd.api.types.is_number(7.15)
4952
True
50-
>>> is_number(False)
53+
>>> pd.api.types.is_number(False)
5154
True
52-
>>> is_number("foo")
55+
>>> pd.api.types.is_number("foo")
5356
False
54-
>>> is_number("5")
57+
>>> pd.api.types.is_number("5")
5558
False
5659
"""
5760

0 commit comments

Comments
 (0)