wesm/pandas — Issue #676: Mean is incorrectly NaN in 'object' DataFrame
Author: craustin
Created: 2012-01-24 15:03:39+00:00
State: open

from pandas import DataFrame
df = DataFrame({0: [np.nan, 2], 1: [np.nan, 3], 2: [np.nan, 4]}, dtype=object)
df.mean(1)

Expected:
In [33]: df.mean(1)
Out[33]:
0 NaN
1 3.0

Actual:
In [31]: df.mean(1)
Out[31]:
0 NaN
1 NaN