wesm/pandas — Issue #690: Series that used to be typed numeric is now typed 'object'
Author: craustin
Created: 2012-01-26 16:04:43+00:00
State: open

import numpy as np
from pandas import Series
s = Series(range(3))
s2 = s.map(lambda x: np.where(x == 0, 0, 1))
print s2.dtype

In pandas 0.6.0, this returned 'float64', but now it returns 'object'. This change requires us to explicitly specify some dtypes to pandas constructors as a workaround. If this is the desired behavior, we can live with it - but wanted to alert you guys.