Examples

By default, the product of an empty or all-NA Series is 1

In [1]:
import numpy as np
import pandas as pd
In [2]:
pd.Series([]).prod()
Out[2]:
1.0

This can be controlled with the min_count parameter

In [4]:
pd.Series([]).prod(min_count=1)
Out[4]:
nan

skipna parameter, min_count handles all-NA and empty series identically.

In [5]:
pd.Series([np.nan]).prod()
Out[5]:
1.0
In [6]:
pd.Series([np.nan]).prod(min_count=1)
Out[6]:
nan