title: ValueError: Input contains NaN, infinity or a value too large for dtype('float64') using LinearRegression
body: <p>I am practicing machine learning in python. I am stuck on an obstacle but I am having difficulties. The data set I am using is titanic.csv. I am trying to calculate the Age column missing values using Linear Regression. </p>
  
  <pre><code>training = dftrain[['Age','SibSp','Parch','Fare','Pclass','Sex_female',
                  'Sex_male','Embarked_C','Embarked_Q','Embarked_S']]
  testing  = dftest[['Age','SibSp','Parch','Fare','Pclass','Sex_female',
                 'Sex_male','Embarked_C','Embarked_Q','Embarked_S']]
  unify = pd.concat([training, testing])
  train = unify[unify['Age'].notnull()]
  clf = LinearRegression()
  #clf.fit(train.drop(['Age'],axis = 1), train['Age'])
  pd.set_option('display.max_rows',None )
  train 
  </code></pre>
  
  <p>I have manually tried to fix the error by doing,</p>
  
  <pre><code>train[train['Age'].isnull()]
  </code></pre>
  
  <p>using the above code I getting columns with no values indicating that there are no NaN values. I did this for all the columns. I also checked using,</p>
  
  <pre><code>train.notnull().count() 
  Age           1046
  SibSp         1046
  Parch         1046
  Fare          1046
  Pclass        1046
  Sex_female    1046
  Sex_male      1046
  Embarked_C    1046
  Embarked_Q    1046
  Embarked_S    1046
  dtype: int64    
  </code></pre>
  
  <p>but whenever I think everything is good to go and I uncomment the clf.fit() function I get the error</p>
  
  <pre><code>ValueError: Input contains NaN, infinity or a value too large for dtype('float64').
  </code></pre>
  
  <p>Please help I can't figure out what is wrong in my code.</p>