Spec-Zone.ru › Polars

polars.Series.product

Series.product() → int | float

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 return None, you can use s.product() if s.count() else None instead of s.product().

Examples

>>> s = pl.Series("a", [1, 2, 3])
>>> s.product()
6

© 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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API