I noticed a problem converting lists of NaN values to sets:
import pandas as pd
import numpy as np
x = pd.DataFrame({'a':[None,None]})
x_numeric = pd.to_numeric(x['a']) #converts to numpy.float64
set(x_numeric)
This SHOULD return {nan} but instead returns {nan, nan}. However, doing this:
set([numpy.nan, numpy.nan])
returns the expected {nan}. The former are apparently class numpy.float64, while the latter are by default class float.
Any idea why set() doesn't work with numpy.float64 NaN values? I'm using Pandas version 0.18 and Numpy version 1.10.4.