def take(self, indices: List[int], axis: Axis=0, **kwargs: Any) -> 'DataFrame':
    "\n        Return the elements in the given *positional* indices along an axis.\n\n        This means that we are not indexing according to actual values in\n        the index attribute of the object. We are indexing according to the\n        actual position of the element in the object.\n\n        Parameters\n        ----------\n        indices : array-like\n            An array of ints indicating which positions to take.\n        axis : {0 or 'index', 1 or 'columns', None}, default 0\n            The axis on which to select elements. ``0`` means that we are\n            selecting rows, ``1`` means that we are selecting columns.\n        **kwargs\n            For compatibility with :meth:`numpy.take`. Has no effect on the\n            output.\n\n        Returns\n        -------\n        taken : same type as caller\n            An array-like containing the elements taken from the object.\n\n        See Also\n        --------\n        DataFrame.loc : Select a subset of a DataFrame by labels.\n        DataFrame.iloc : Select a subset of a DataFrame by positions.\n        numpy.take : Take elements from an array along an axis.\n\n        Examples\n        --------\n        >>> df = ps.DataFrame([('falcon', 'bird', 389.0),\n        ...                    ('parrot', 'bird', 24.0),\n        ...                    ('lion', 'mammal', 80.5),\n        ...                    ('monkey', 'mammal', np.nan)],\n        ...                   columns=['name', 'class', 'max_speed'],\n        ...                   index=[0, 2, 3, 1])\n        >>> df\n             name   class  max_speed\n        0  falcon    bird      389.0\n        2  parrot    bird       24.0\n        3    lion  mammal       80.5\n        1  monkey  mammal        NaN\n\n        Take elements at positions 0 and 3 along the axis 0 (default).\n\n        Note how the actual indices selected (0 and 1) do not correspond to\n        our selected indices 0 and 3. That's because we are selecting the 0th\n        and 3rd rows, not rows whose indices equal 0 and 3.\n\n        >>> df.take([0, 3]).sort_index()\n             name   class  max_speed\n        0  falcon    bird      389.0\n        1  monkey  mammal        NaN\n\n        Take elements at indices 1 and 2 along the axis 1 (column selection).\n\n        >>> df.take([1, 2], axis=1)\n            class  max_speed\n        0    bird      389.0\n        2    bird       24.0\n        3  mammal       80.5\n        1  mammal        NaN\n\n        We may take elements using negative integers for positive indices,\n        starting from the end of the object, just like with Python lists.\n\n        >>> df.take([-1, -2]).sort_index()\n             name   class  max_speed\n        1  monkey  mammal        NaN\n        3    lion  mammal       80.5\n        "
    axis = validate_axis(axis)
    if ((not is_list_like(indices)) or isinstance(indices, (dict, set))):
        raise TypeError('`indices` must be a list-like except dict or set')
    if (axis == 0):
        return cast(DataFrame, self.iloc[indices, :])
    else:
        return cast(DataFrame, self.iloc[:, indices])
Return the elements in the given *positional* indices along an axis.

This means that we are not indexing according to actual values in
the index attribute of the object. We are indexing according to the
actual position of the element in the object.

Parameters
----------
indices : array-like
    An array of ints indicating which positions to take.
axis : {0 or 'index', 1 or 'columns', None}, default 0
    The axis on which to select elements. ``0`` means that we are
    selecting rows, ``1`` means that we are selecting columns.
**kwargs
    For compatibility with :meth:`numpy.take`. Has no effect on the
    output.

Returns
-------
taken : same type as caller
    An array-like containing the elements taken from the object.

See Also
--------
DataFrame.loc : Select a subset of a DataFrame by labels.
DataFrame.iloc : Select a subset of a DataFrame by positions.
numpy.take : Take elements from an array along an axis.

Examples
--------
>>> df = ps.DataFrame([('falcon', 'bird', 389.0),
...                    ('parrot', 'bird', 24.0),
...                    ('lion', 'mammal', 80.5),
...                    ('monkey', 'mammal', np.nan)],
...                   columns=['name', 'class', 'max_speed'],
...                   index=[0, 2, 3, 1])
>>> df
     name   class  max_speed
0  falcon    bird      389.0
2  parrot    bird       24.0
3    lion  mammal       80.5
1  monkey  mammal        NaN

Take elements at positions 0 and 3 along the axis 0 (default).

Note how the actual indices selected (0 and 1) do not correspond to
our selected indices 0 and 3. That's because we are selecting the 0th
and 3rd rows, not rows whose indices equal 0 and 3.

>>> df.take([0, 3]).sort_index()
     name   class  max_speed
0  falcon    bird      389.0
1  monkey  mammal        NaN

Take elements at indices 1 and 2 along the axis 1 (column selection).

>>> df.take([1, 2], axis=1)
    class  max_speed
0    bird      389.0
2    bird       24.0
3  mammal       80.5
1  mammal        NaN

We may take elements using negative integers for positive indices,
starting from the end of the object, just like with Python lists.

>>> df.take([-1, -2]).sort_index()
     name   class  max_speed
1  monkey  mammal        NaN
3    lion  mammal       80.5
def take(self, indices: List[int], axis: Axis=0, **kwargs: Any) -> 'DataFrame':
    "\n        Return the elements in the given *positional* indices along an axis.\n\n        This means that we are not indexing according to actual values in\n        the index attribute of the object. We are indexing according to the\n        actual position of the element in the object.\n\n        Parameters\n        ----------\n        indices : array-like\n            An array of ints indicating which positions to take.\n        axis : {0 or 'index', 1 or 'columns', None}, default 0\n            The axis on which to select elements. ``0`` means that we are\n            selecting rows, ``1`` means that we are selecting columns.\n        **kwargs\n            For compatibility with :meth:`numpy.take`. Has no effect on the\n            output.\n\n        Returns\n        -------\n        taken : same type as caller\n            An array-like containing the elements taken from the object.\n\n        See Also\n        --------\n        DataFrame.loc : Select a subset of a DataFrame by labels.\n        DataFrame.iloc : Select a subset of a DataFrame by positions.\n        numpy.take : Take elements from an array along an axis.\n\n        Examples\n        --------\n        >>> df = ps.DataFrame([('falcon', 'bird', 389.0),\n        ...                    ('parrot', 'bird', 24.0),\n        ...                    ('lion', 'mammal', 80.5),\n        ...                    ('monkey', 'mammal', np.nan)],\n        ...                   columns=['name', 'class', 'max_speed'],\n        ...                   index=[0, 2, 3, 1])\n        >>> df\n             name   class  max_speed\n        0  falcon    bird      389.0\n        2  parrot    bird       24.0\n        3    lion  mammal       80.5\n        1  monkey  mammal        NaN\n\n        Take elements at positions 0 and 3 along the axis 0 (default).\n\n        Note how the actual indices selected (0 and 1) do not correspond to\n        our selected indices 0 and 3. That's because we are selecting the 0th\n        and 3rd rows, not rows whose indices equal 0 and 3.\n\n        >>> df.take([0, 3]).sort_index()\n             name   class  max_speed\n        0  falcon    bird      389.0\n        1  monkey  mammal        NaN\n\n        Take elements at indices 1 and 2 along the axis 1 (column selection).\n\n        >>> df.take([1, 2], axis=1)\n            class  max_speed\n        0    bird      389.0\n        2    bird       24.0\n        3  mammal       80.5\n        1  mammal        NaN\n\n        We may take elements using negative integers for positive indices,\n        starting from the end of the object, just like with Python lists.\n\n        >>> df.take([-1, -2]).sort_index()\n             name   class  max_speed\n        1  monkey  mammal        NaN\n        3    lion  mammal       80.5\n        "
    axis = validate_axis(axis)
    if ((not is_list_like(indices)) or isinstance(indices, (dict, set))):
        raise TypeError('`indices` must be a list-like except dict or set')
    if (axis == 0):
        return cast(DataFrame, self.iloc[indices, :])
    else:
        return cast(DataFrame, self.iloc[:, indices])