I was messing with pandas in the interpreter and the following behavior took me by surprise:

```
>>> data2 = [[1, np.nan], [2, -17]]
>>> f2 = pd.DataFrame(data2)
>>> f2
   0     1
0  1   NaN
1  2 -17.0
>>> f2.values[1, 1] = -99.0
>>> f2
   0     1
0  1   NaN
1  2 -17.0
>>> type(f2.values[0, 0]), type(f2.values[1, 0])
(<class 'numpy.float64'>, <class 'numpy.float64'>)

```

I am unable to assign directly to the underlying array using the values attribute. However, if I explicitly start with floats, I can:

```
>>> data = [[1.0, np.nan], [2.0, -17.0]]
>>> f = pd.DataFrame(data)
>>> f
     0     1
0  1.0   NaN
1  2.0 -17.0
>>> f.values[1, 1] = -99.0
>>> f
     0     1
0  1.0   NaN
1  2.0 -99.0

```

Does anyone know a rule that would have allowed me to predict this? I feel like I must be missing something obvious.