ValueError: Input contains NaN, infinity or a value too large for dtype('float64')
I have tried so many suggested solutions but I found this one solve the problem. 

data =data[~data.isin([np.nan, np.inf, -np.inf]).any(1)]