You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "", line 1, in
File ".../pandas/core/series.py", line 650, in mean
return nanops.nanmean(self.values, skipna=skipna)
File ".../pandas/core/nanops.py", line 30, in nanmean
the_mean = values.sum(axis) / float(values.shape[axis])
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
import pandas
import numpy as np
lis = [1, 3, 5, np.nan, 7]
index = [1, 2, 3, 4, 5]
ser = pandas.core.series.Series(data=lis, index=index)
ser.mean()
(gives no error)
The text was updated successfully, but these errors were encountered:
reported by @npinger, regression from 0.5.0 I think.
import pandas
lis = [1, 3, 5, None, 7]
index = [1, 2, 3, 4, 5]
ser = pandas.core.series.Series(data=lis, index=index)
ser.mean()
Gives this error:
Traceback (most recent call last):
File "", line 1, in
File ".../pandas/core/series.py", line 650, in mean
return nanops.nanmean(self.values, skipna=skipna)
File ".../pandas/core/nanops.py", line 30, in nanmean
the_mean = values.sum(axis) / float(values.shape[axis])
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
import pandas
import numpy as np
lis = [1, 3, 5, np.nan, 7]
index = [1, 2, 3, 4, 5]
ser = pandas.core.series.Series(data=lis, index=index)
ser.mean()
(gives no error)
The text was updated successfully, but these errors were encountered: