Skip to content

Commit 8a66d3a

Browse files
committed
to_numpy example
1 parent 1aaaa9a commit 8a66d3a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/core/arrays/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,12 @@ def to_numpy(
567567
Returns
568568
-------
569569
numpy.ndarray
570+
571+
Examples
572+
-------
573+
>>> arr = pd.array([4, 5])
574+
>>> arr.to_numpy()
575+
array([4, 5], dtype=object)
570576
"""
571577
result = np.asarray(self, dtype=dtype)
572578
if copy or na_value is not lib.no_default:

0 commit comments

Comments
 (0)