BUG, dot product with empty dataframe #13466
Labels
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Numeric Operations
Arithmetic, Comparison, and Logical operations
Dot product of empty dataframe resulted in dataframe filled with zeros.
I thought the expected ones would be empty or NaN?
In [3]: df = pd.DataFrame(index = ['a','b'])
In [4]: srs = pd.Series()
In [5]: df
Out[5]:
Empty DataFrame
Columns: []
Index: [a, b]
In [6]: srs
Out[6]: Series([], dtype: float64)
In [7]: df.dot(srs)
Out[7]:
a 0
b 0
dtype: float64
The text was updated successfully, but these errors were encountered: