BUG: changing series dtype inplace (original) (raw)

All of the following current fail because of in-place dtype conversions

In [2]: s = Series([1,2,3])
In [3]: s.iloc[0] = np.nan
ValueError: cannot convert float NaN to integer

In [4]: s.loc[0] = np.nan
ValueError: cannot convert float NaN to integer

In [5]: s[0] = np.nan
TypeError: 'int' object is not iterable