English subtitles

← Imputation Exercise - Intro to Data Science

Get Embed Code
4 Languages

Showing Revision 5 created 05/25/2016 by Udacity Robot.

  1. All right, let's walk through the solution to
  2. this guy. It's a pretty straightforward one line
  3. solution. We simply say baseball weight equals baseball
  4. weight.fillna numpy.mean baseball weight. What we're doing here
  5. is saying let's compute the mean of all
  6. the existing non NA values in baseball weight.
  7. Then let's take all the NA's in baseball
  8. weight. And replace them with this mean value.
  9. Let's take the baseball weight column, and replace it with
  10. this new column, which doesn't have any NA values in it.