polars.Series.product#
- Series.product() int | float[source]#
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