aggregate(self, func, *args, **kwargs)
:None:None:`agg`
is an alias for aggregate
. Use the alias.
Functions that mutate the passed object can produce unexpected behavior or errors and are not supported. See gotchas.udf-mutation
for more details.
A passed user-defined-function will be passed a Series for evaluation.
Function to use for aggregating the data. If a function, must either work when passed a Series/Dataframe or when passed to Series/Dataframe.apply.
Accepted combinations are:
function
string function name
list of functions and/or function names, e.g. [np.sum, 'mean']
dict of axis labels -> functions, function names or list of such.
Positional arguments to pass to func
.
Keyword arguments to pass to func
.
The return can be:
Aggregate using one or more operations over the specified axis.
pandas.DataFrame.aggregate
Similar DataFrame method.
pandas.Series.aggregate
Similar Series method.
>>> df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6], "C": [7, 8, 9]})This example is valid syntax, but we were not able to check execution
... df A B C 0 1 4 7 1 2 5 8 2 3 6 9
>>> df.ewm(alpha=0.5).mean() A B C 0 1.000000 4.000000 7.000000 1 1.666667 4.666667 7.666667 2 2.428571 5.428571 8.428571See :
The following pages refer to to this document either explicitly or contain code examples using this.
pandas.core.window.expanding.Expanding.aggregate
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them