polars.Series.product
-
Reduce this Series to the product value.
Notes
If there are no non-null values, then the output is
1. If you would prefer empty products to returnNone, you can uses.product() if s.count() else Noneinstead ofs.product().Examples
>>> s = pl.Series("a", [1, 2, 3]) >>> s.product() 6
Series.product() → int | float
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/series/api/polars.Series.product.html