pyspark.pandas.Series.aggregate#
- Series.aggregate(func)[source]#
 Aggregate using one or more operations over the specified axis.
- Parameters
 - funcstr or a list of str
 function name(s) as string apply to series.
- Returns
 - scalar, Series
 The return can be: - scalar : when Series.agg is called with single function - Series : when Series.agg is called with several functions
See also
Series.applyInvoke function on a Series.
Series.transformOnly perform transforming type operations.
Series.groupbyPerform operations over groups.
DataFrame.aggregateThe equivalent function for DataFrame.
Notes
agg is an alias for aggregate. Use the alias.
Examples
>>> s = ps.Series([1, 2, 3, 4]) >>> s.agg('min') 1
>>> s.agg(['min', 'max']).sort_index() max 4 min 1 dtype: int64