File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,11 @@ def array(
210
210
[1, 2, <NA>]
211
211
Length: 3, dtype: Int64
212
212
213
+ >>> pd.array([1.1, 2.2])
214
+ <FloatingArray>
215
+ [1.1, 2.2]
216
+ Length: 2, dtype: Float64
217
+
213
218
>>> pd.array(["a", None, "c"])
214
219
<StringArray>
215
220
['a', <NA>, 'c']
@@ -236,10 +241,10 @@ def array(
236
241
If pandas does not infer a dedicated extension type a
237
242
:class:`arrays.PandasArray` is returned.
238
243
239
- >>> pd.array([1.1, 2.2 ])
244
+ >>> pd.array([1 + 1j, 3 + 2j ])
240
245
<PandasArray>
241
- [1.1, 2.2 ]
242
- Length: 2, dtype: float64
246
+ [(1+1j), (3+2j) ]
247
+ Length: 2, dtype: complex128
243
248
244
249
As mentioned in the "Notes" section, new extension types may be added
245
250
in the future (by pandas or 3rd party libraries), causing the return
You can’t perform that action at this time.
0 commit comments