GroupBy.tail()

GroupBy.tail(n=5) [source] Returns last n rows of each group Essentially equivalent to .apply(lambda x: x.tail(n)), except ignores as_index flag. See also pandas.Series.groupby, pandas.DataFrame.groupby, pandas.Panel.groupby Examples >>> df = DataFrame([['a', 1], ['a', 2], ['b', 1], ['b', 2]], columns=['A', 'B']) >>> df.groupby('A').tail(1) A B 1 a 2 3 b 2 >>> df.groupby('A').head(1) A B 0 a 1 2 b 1

GroupBy.sum()

GroupBy.sum() [source] Compute sum of group values See also pandas.Series.groupby, pandas.DataFrame.groupby, pandas.Panel.groupby

GroupBy.std()

GroupBy.std(ddof=1, *args, **kwargs) [source] Compute standard deviation of groups, excluding missing values For multiple groupings, the result index will be a MultiIndex Parameters: ddof : integer, default 1 degrees of freedom See also pandas.Series.groupby, pandas.DataFrame.groupby, pandas.Panel.groupby

GroupBy.size()

GroupBy.size() [source] Compute group sizes See also pandas.Series.groupby, pandas.DataFrame.groupby, pandas.Panel.groupby

GroupBy.sem()

GroupBy.sem(ddof=1) [source] Compute standard error of the mean of groups, excluding missing values For multiple groupings, the result index will be a MultiIndex Parameters: ddof : integer, default 1 degrees of freedom See also pandas.Series.groupby, pandas.DataFrame.groupby, pandas.Panel.groupby

GroupBy.prod()

GroupBy.prod() [source] Compute prod of group values See also pandas.Series.groupby, pandas.DataFrame.groupby, pandas.Panel.groupby

GroupBy.ohlc()

GroupBy.ohlc() [source] Compute sum of values, excluding missing values For multiple groupings, the result index will be a MultiIndex See also pandas.Series.groupby, pandas.DataFrame.groupby, pandas.Panel.groupby

GroupBy.nth()

GroupBy.nth(n, dropna=None) [source] Take the nth row from each group if n is an int, or a subset of rows if n is a list of ints. If dropna, will take the nth non-null row, dropna is either Truthy (if a Series) or ?all?, ?any? (if a DataFrame); this is equivalent to calling dropna(how=dropna) before the groupby. Parameters: n : int or list of ints a single nth value for the row or a list of nth values dropna : None or str, optional apply the specified dropna operation before counting wh

GroupBy.min()

GroupBy.min() [source] Compute min of group values See also pandas.Series.groupby, pandas.DataFrame.groupby, pandas.Panel.groupby

GroupBy.median()

GroupBy.median() [source] Compute median of groups, excluding missing values For multiple groupings, the result index will be a MultiIndex See also pandas.Series.groupby, pandas.DataFrame.groupby, pandas.Panel.groupby