diff --git a/pandas/core/indexes/datetimelike.py b/pandas/core/indexes/datetimelike.py index 01b1016007951..70580a4780da3 100644 --- a/pandas/core/indexes/datetimelike.py +++ b/pandas/core/indexes/datetimelike.py @@ -1064,6 +1064,7 @@ def take( ) -> Self: """ Return a new Index of the values selected by the indices. + For internal compatibility with numpy arrays. Parameters @@ -1074,6 +1075,15 @@ def take( The axis over which to select values, always 0 or 'index'. allow_fill : bool, default True How to handle negative values in `indices`. + + * False: negative values in `indices` indicate positional indices + from the right (the default). This is similar to + :func:`numpy.take`. + + * True: negative values in `indices` indicate + missing values. These values are set to `fill_value`. Any other + other negative values raise a ``ValueError``. + * False: negative values in `indices` indicate positional indices from the right (the default). This is similar to :func:`numpy.take`.