upby.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.first  #

DataFrameGroupBy.  first  (  _ numeric_only  =  False  _ , _ min_count  =  -1
_ , _ skipna  =  True  _ )  [ [source]  ](https://github.com/pandas-
dev/pandas/blob/v2.2.2/pandas/core/groupby/groupby.py#L3337-L3415) #

    

Compute the first entry of each column within each group.

Defaults to skipping NA elements.

Parameters  :

    

**numeric_only** bool, default False

    

Include only float, int, boolean columns.

**min_count** int, default -1

    

The required number of valid values to perform the operation. If fewer than `
min_count  ` valid values are present the result will be NA.

**skipna** bool, default True

    

Exclude NA/null values. If an entire row/column is NA, the result will be NA.

New in version 2.2.1.

Returns  :

    

Series or DataFrame

    

First values within each group.

See also

` DataFrame.groupby  `

    

Apply a function groupby to each row or column of a DataFrame.

[ ` pandas.core.groupby.DataFrameGroupBy.last  `
](pandas.core.groupby.DataFrameGroupBy.last.html#pandas.core.groupby.DataFrameGroupBy.last
"pandas.core.groupby.DataFrameGroupBy.last")

    

Compute the last non-null entry of each column.

[ ` pandas.core.groupby.DataFrameGroupBy.nth  `
](pandas.core.groupby.DataFrameGroupBy.nth.html#pandas.core.groupby.DataFrameGroupBy.nth
"pandas.core.groupby.DataFrameGroupBy.nth")

    

Take the nth row from each group.

Examples

    
    
    >>> df = pd.DataFrame(dict(A=[1, 1, 3], B=[None, 5, 6], C=[1, 2, 3],
    ...                        D=['3/11/2000', '3/12/2000', '3/13/2000']))
    >>> df['D'] = pd.to_datetime(df['D'])
    >>> df.groupby("A").first()
         B  C          D
    A
    1  5.0  1 2000-03-11
    3  6.0  3 2000-03-13
    >>> df.groupby("A").first(min_count=2)
        B    C          D
    A
    1 NaN  1.0 2000-03-11
    3 NaN  NaN        NaT
    >>> df.groupby("A").first(numeric_only=True)
         B  C
    A
    1  5.0  1
    3  6.0  3
    

[