We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9c479a commit 539d51cCopy full SHA for 539d51c
pandas/core/algorithms.py
@@ -1418,20 +1418,20 @@ def take(
1418
1419
Examples
1420
--------
1421
- >>> from pandas.api.extensions import take
+ >>> import pandas as pd
1422
1423
With the default ``allow_fill=False``, negative numbers indicate
1424
positional indices from the right.
1425
1426
- >>> take(np.array([10, 20, 30]), [0, 0, -1])
+ >>> pd.api.extensions.take(np.array([10, 20, 30]), [0, 0, -1])
1427
array([10, 10, 30])
1428
1429
Setting ``allow_fill=True`` will place `fill_value` in those positions.
1430
1431
- >>> take(np.array([10, 20, 30]), [0, 0, -1], allow_fill=True)
+ >>> pd.api.extensions.take(np.array([10, 20, 30]), [0, 0, -1], allow_fill=True)
1432
array([10., 10., nan])
1433
1434
- >>> take(np.array([10, 20, 30]), [0, 0, -1], allow_fill=True,
+ >>> pd.api.extensions.take(np.array([10, 20, 30]), [0, 0, -1], allow_fill=True,
1435
... fill_value=-10)
1436
array([ 10, 10, -10])
1437
"""
0 commit comments