Inconsistent Nan Key Error using Pandas Apply
I'm recoding multiple columns in a dataframe and have come across a strange result that I can't quite figure out. I'm probably not recoding in the most efficient manner possible, but it's mostly the error that I'm hoping someone can explain.

```
s1 = pd.DataFrame([np.nan, '1', '2', '3', '4', '5', columns='col1')
s2 = pd.DataFrame([np.nan, 1, 2, 3, 4, 5], columns='col1')
s1_dic = {np.nan: np.nan, '1': 1, '2':2, '3':3, '4':3, '5':3}
s2_dic = {np.nan: np.nan, 1: 1, 2:2, 3:3, 4:3, 5:3}
s1['col1'].apply(lambda x: s1_dic[x])
s2['col1'].apply(lambda x: s2_dic[x])
```

s1 works fine, but when I try to do the same thing with a list of integers and a np.nan, I get KeyError: nan which is confusing. Any help would be appreciated.

edit @hayd: http://stackoverflow.com/q/33286748/1240268
