From d347302ac46f3cf996f349d08c7add0ff0ce5f5c Mon Sep 17 00:00:00 2001 From: mariana-LJ Date: Sat, 5 Feb 2022 15:26:31 -0800 Subject: [PATCH] DOC: Update import statement (GH21749) --- pandas/core/algorithms.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py index ddb8e19d1c558..a1415d5989e2e 100644 --- a/pandas/core/algorithms.py +++ b/pandas/core/algorithms.py @@ -1418,20 +1418,20 @@ def take( Examples -------- - >>> from pandas.api.extensions import take + >>> import pandas as pd With the default ``allow_fill=False``, negative numbers indicate positional indices from the right. - >>> take(np.array([10, 20, 30]), [0, 0, -1]) + >>> pd.api.extensions.take(np.array([10, 20, 30]), [0, 0, -1]) array([10, 10, 30]) Setting ``allow_fill=True`` will place `fill_value` in those positions. - >>> 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) array([10., 10., nan]) - >>> 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, ... fill_value=-10) array([ 10, 10, -10]) """