File tree 1 file changed +17
-15
lines changed
1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -110,23 +110,25 @@ def is_scalar(val: object) -> bool:
110
110
Parameters
111
111
----------
112
112
val : object
113
- This includes:
114
- * numpy array scalar (e.g. np.int64 )
115
- * Python builtin numerics
116
- * Python builtin byte arrays and strings
117
- * None
118
- * instances of datetime.datetime
119
- * instances of datetime.timedelta
120
- * Period
121
- * instances of decimal.Decimal
122
- * Interval
123
- * DateOffset
124
- * Fraction
125
- * Number
113
+ This includes:
114
+
115
+ - numpy array scalar (e.g. np.int64 )
116
+ - Python builtin numerics
117
+ - Python builtin byte arrays and strings
118
+ - None
119
+ - datetime.datetime
120
+ - datetime.timedelta
121
+ - Period
122
+ - decimal.Decimal
123
+ - Interval
124
+ - DateOffset
125
+ - Fraction
126
+ - Number
126
127
127
128
Returns
128
129
-------
129
- a bool object.
130
+ bool
131
+ Return True if given object is scalar , False otherwise
130
132
131
133
Examples
132
134
--------
@@ -137,7 +139,7 @@ def is_scalar(val: object) -> bool:
137
139
>>> pd.api.types.is_scalar([2, 3])
138
140
False
139
141
140
- >>> pd.api.types.is_scalar({0:1, 2:3})
142
+ >>> pd.api.types.is_scalar({0: 1, 2: 3})
141
143
False
142
144
143
145
>>> pd.api.types.is_scalar((0, 2))
You can’t perform that action at this time.
0 commit comments