Skip to content

Commit 0aa91ba

Browse files
committed
Fix previously modified docstring
1 parent fc31e58 commit 0aa91ba

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

Diff for: pandas/core/dtypes/inference.py

+13-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+
Returns True when the object is a number, and False if is not.
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,19 @@ 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+
54+
Booleans are valid because they are int subclass.
55+
56+
>>> pd.api.types.is_number(False)
5157
True
52-
>>> is_number("foo")
58+
59+
>>> pd.api.types.is_number("foo")
5360
False
54-
>>> is_number("5")
61+
>>> pd.api.types.is_number("5")
5562
False
5663
"""
5764

0 commit comments

Comments
 (0)