GroupBy.apply()

GroupBy.apply(func, *args, **kwargs) [source] Apply function and combine results together in an intelligent way. The split-apply-combine combination rules attempt to be as common sense based as possible. For example: case 1: group DataFrame apply aggregation function (f(chunk) -> Series) yield DataFrame, with group axis having group labels case 2: group DataFrame apply transform function ((f(chunk) -> DataFrame with same indexes) yield DataFrame with resulting chunks glued together ca

Group By: split-apply-combine

By ?group by? we are referring to a process involving one or more of the following steps Splitting the data into groups based on some criteria Applying a function to each group independently Combining the results into a data structure Of these, the split step is the most straightforward. In fact, in many situations you may wish to split the data set into groups and do something with those groups yourself. In the apply step, we might wish to one of the following: Aggregation: computing

GroupBy.aggregate()

GroupBy.aggregate(func, *args, **kwargs) [source]

formats.style.Styler()

class pandas.formats.style.Styler(data, precision=None, table_styles=None, uuid=None, caption=None, table_attributes=None) [source] Helps style a DataFrame or Series according to the data with HTML and CSS. New in version 0.17.1. Warning This is a new feature and is under active development. We?ll be adding features and possibly making breaking changes in future releases. Parameters: data: Series or DataFrame precision: int precision to round floats to, defaults to pd.options.display.

Frequently Asked Questions (FAQ)

DataFrame memory usage As of pandas version 0.15.0, the memory usage of a dataframe (including the index) is shown when accessing the info method of a dataframe. A configuration option, display.memory_usage (see Options and Settings), specifies if the dataframe?s memory usage will be displayed when invoking the df.info() method. For example, the memory usage of the dataframe below is shown when calling df.info(): In [1]: dtypes = ['int64', 'float64', 'datetime64[ns]', 'timedelta64[ns]', ..

Expanding.var()

Expanding.var(ddof=1, *args, **kwargs) [source] expanding variance Parameters: ddof : int, default 1 Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. Returns: same type as input See also pandas.Series.expanding, pandas.DataFrame.expanding

Expanding.sum()

Expanding.sum(*args, **kwargs) [source] expanding sum Parameters: how : string, default None (DEPRECATED) Method for down- or re-sampling Returns: same type as input See also pandas.Series.expanding, pandas.DataFrame.expanding

Expanding.std()

Expanding.std(ddof=1, *args, **kwargs) [source] expanding standard deviation Parameters: ddof : int, default 1 Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. Returns: same type as input See also pandas.Series.expanding, pandas.DataFrame.expanding

Expanding.skew()

Expanding.skew(**kwargs) [source] Unbiased expanding skewness Returns: same type as input See also pandas.Series.expanding, pandas.DataFrame.expanding

Expanding.quantile()

Expanding.quantile(quantile, **kwargs) [source] expanding quantile Parameters: quantile : float 0 <= quantile <= 1 Returns: same type as input See also pandas.Series.expanding, pandas.DataFrame.expanding