# dask.dataframe.Series.cumprod

#### Series.cumprod(axis=0, skipna=True, \*\*kwargs)

Return cumulative product over a DataFrame or Series axis.

This docstring was copied from pandas.DataFrame.cumprod.

Some inconsistencies with the Dask version may exist.

Returns a DataFrame or Series of the same size containing the cumulative
product.

* **Parameters:**
  **axis**
  : The index or the name of the axis. 0 is equivalent to None or ‘index’.
    For Series this parameter is unused and defaults to 0.

  **skipna**
  : Exclude NA/null values. If an entire row/column is NA, the result
    will be NA.

  **numeric_only**
  : Include only float, int, boolean columns.

  **\*args, \*\*kwargs**
  : Additional keywords have no effect but might be accepted for
    compatibility with NumPy. See [NumPy compatibility kwargs](https://pandas.pydata.org/pandas-docs/stable/user_guide/gotchas.html#gotchas-numpy-kwargs) for more.
* **Returns:**
  Series or DataFrame
  : Return cumulative product of Series or DataFrame.

#### SEE ALSO
[`DataFrame.prod`](dask.dataframe.DataFrame.prod.html.md#dask.dataframe.DataFrame.prod)
: Return the product over DataFrame axis.

[`DataFrame.cummax`](dask.dataframe.DataFrame.cummax.html.md#dask.dataframe.DataFrame.cummax)
: Return cumulative maximum over DataFrame axis.

[`DataFrame.cummin`](dask.dataframe.DataFrame.cummin.html.md#dask.dataframe.DataFrame.cummin)
: Return cumulative minimum over DataFrame axis.

[`DataFrame.cumsum`](dask.dataframe.DataFrame.cumsum.html.md#dask.dataframe.DataFrame.cumsum)
: Return cumulative sum over DataFrame axis.

### Examples

**Series**

```pycon
>>> s = pd.Series([2, np.nan, 5, -1, 0])
>>> s
0    2.0
1    NaN
2    5.0
3   -1.0
4    0.0
dtype: float64
```

By default, NA values are ignored.

```pycon
>>> s.cumprod()
0     2.0
1     NaN
2    10.0
3   -10.0
4    -0.0
dtype: float64
```

To include NA values in the operation, use `skipna=False`

```pycon
>>> s.cumprod(skipna=False)
0    2.0
1    NaN
2    NaN
3    NaN
4    NaN
dtype: float64
```

**DataFrame**

```pycon
>>> df = pd.DataFrame(
...     [[2.0, 1.0], [3.0, np.nan], [1.0, 0.0]], columns=list("AB")
... )
>>> df
     A    B
0  2.0  1.0
1  3.0  NaN
2  1.0  0.0
```

By default, iterates over rows and finds the product
in each column. This is equivalent to `axis=None` or `axis='index'`.

```pycon
>>> df.cumprod()
     A    B
0  2.0  1.0
1  6.0  NaN
2  6.0  0.0
```

To iterate over columns and find the product in each row,
use `axis=1`

```pycon
>>> df.cumprod(axis=1)
     A    B
0  2.0  2.0
1  3.0  NaN
2  1.0  0.0
```

<!-- !! processed by numpydoc !! -->
