@disallow('<STR_LIT>', '<STR_LIT>')<EOL>def nanprod(values, axis=None, skipna=True, min_count=<NUM_LIT:0>, mask=None):
if mask is None:<EOL><INDENT>mask = isna(values)<EOL><DEDENT>if skipna and not is_any_int_dtype(values):<EOL><INDENT>values = values.copy()<EOL>values[mask] = <NUM_LIT:1><EOL><DEDENT>result = values.prod(axis)<EOL>return _maybe_null_out(result, axis, mask, min_count=min_count)<EOL>
Parameters
----------
values : ndarray[dtype]
axis: int, optional
skipna : bool, default True
min_count: int, default 0
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : dtype

Examples
--------
>>> import pandas.core.nanops as nanops
>>> s = pd.Series([1, 2, 3, np.nan])
>>> nanops.nanprod(s)
6.0

Returns
--------
The product of all elements on a given axis. ( NaNs are treated as 1)