Series.product(self, axis=None, skipna=None, level=None, numeric_only=None, min_count=0, **kwargs)
[source]
Return the product of the values for the requested axis.
Parameters: |
|
---|---|
Returns: |
|
By default, the product of an empty or all-NA Series is 1
>>> pd.Series([]).prod() 1.0
This can be controlled with the min_count
parameter
>>> pd.Series([]).prod(min_count=1) nan
Thanks to the skipna
parameter, min_count
handles all-NA and empty series identically.
>>> pd.Series([np.nan]).prod() 1.0
>>> pd.Series([np.nan]).prod(min_count=1) nan
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.Series.product.html