oupby.SeriesGroupBy.rolling ](pandas.core.groupby.SeriesGroupBy.rolling.html)
    * [ pandas.core.groupby.SeriesGroupBy.sample ](pandas.core.groupby.SeriesGroupBy.sample.html)
    * [ pandas.core.groupby.SeriesGroupBy.sem ](pandas.core.groupby.SeriesGroupBy.sem.html)
    * [ pandas.core.groupby.SeriesGroupBy.shift ](pandas.core.groupby.SeriesGroupBy.shift.html)
    * [ pandas.core.groupby.SeriesGroupBy.size ](pandas.core.groupby.SeriesGroupBy.size.html)
    * [ pandas.core.groupby.SeriesGroupBy.skew ](pandas.core.groupby.SeriesGroupBy.skew.html)
    * [ pandas.core.groupby.SeriesGroupBy.std ](pandas.core.groupby.SeriesGroupBy.std.html)
    * [ pandas.core.groupby.SeriesGroupBy.sum ](pandas.core.groupby.SeriesGroupBy.sum.html)
    * [ pandas.core.groupby.SeriesGroupBy.var ](pandas.core.groupby.SeriesGroupBy.var.html)
    * [ pandas.core.groupby.SeriesGroupBy.tail ](pandas.core.groupby.SeriesGroupBy.tail.html)
    * [ pandas.core.groupby.SeriesGroupBy.take ](pandas.core.groupby.SeriesGroupBy.take.html)
    * [ pandas.core.groupby.SeriesGroupBy.value_counts ](pandas.core.groupby.SeriesGroupBy.value_counts.html)
    * [ pandas.core.groupby.DataFrameGroupBy.boxplot ](pandas.core.groupby.DataFrameGroupBy.boxplot.html)
    * [ pandas.core.groupby.DataFrameGroupBy.hist ](pandas.core.groupby.DataFrameGroupBy.hist.html)
    * [ pandas.core.groupby.SeriesGroupBy.hist ](pandas.core.groupby.SeriesGroupBy.hist.html)
    * [ pandas.core.groupby.DataFrameGroupBy.plot ](pandas.core.groupby.DataFrameGroupBy.plot.html)
    * [ pandas.core.groupby.SeriesGroupBy.plot ](pandas.core.groupby.SeriesGroupBy.plot.html)
  * [ Resampling ](../resampling.html)
  * [ Style ](../style.html)
  * [ Plotting ](../plotting.html)
  * [ Options and settings ](../options.html)
  * [ Extensions ](../extensions.html)
  * [ Testing ](../testing.html)
  * [ Missing values ](../missing_value.html)

  * [ __ ](../../index.html)
  * [ API reference ](../index.html)
  * [ GroupBy ](../groupby.html)
  * pandas.core.... 

#  pandas.core.groupby.DataFrameGroupBy.take  #

DataFrameGroupBy.  take  (  _ indices  _ , _ axis  =  _NoDefault.no_default  _
, _ **  kwargs  _ )  [ [source]  ](https://github.com/pandas-
dev/pandas/blob/v2.2.2/pandas/core/groupby/generic.py#L2524-L2623) #

    

Return the elements in the given _positional_ indices in each group.

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.

If a requested index does not exist for some group, this method will raise. To
get similar behavior that ignores indices that donât exist, see [ `
DataFrameGroupBy.nth()  `
](pandas.core.groupby.DataFrameGroupBy.nth.html#pandas.core.groupby.DataFrameGroupBy.nth
"pandas.core.groupby.DataFrameGroupBy.nth") .

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.

Deprecated since version 2.1.0:  For axis=1, operate on the underlying object
instead. Otherwise the axis keyword is not necessary.

****kwargs**

    

For compatibility with ` numpy.take()  ` . Has no effect on the output.

Returns  :

    

DataFrame

    

An DataFrame containing the elements taken from each group.

See also

` DataFrame.take  `

    

Take elements from a Series along an axis.

` DataFrame.loc  `

    

Select a subset of a DataFrame by labels.

` DataFrame.iloc  `

    

Select a subset of a DataFrame by positions.

[ ` numpy.take  `
](https://numpy.org/doc/stable/reference/generated/numpy.take.html#numpy.take
"\(in NumPy v1.26\)")

    

Take elements from an array along an axis.

Examples

    
    
    >>> df = pd.DataFrame([('falcon', 'bird', 389.0),
    ...                    ('parrot', 'bird', 24.0),
    ...