out[ ] - nan nan nan nan - nan nan - nan - nan - - - - - - in [ ]df dropna(thresh= out[ ] - - - - - filling in missing data rather than filtering out missing data (and potentially discarding other data along with it)you may want to fill in the "holesin any number of ways for most purposesthe fillna method is the workhorse function to use calling fillna with constant replaces missing values with that valuein [ ]df fillna( out[ ] - - - - - - - - - - calling fillna with dict you can use different fill value for each columnin [ ]df fillna({ - }out[ ] - nan nan - nan - - - - - - - - fillna returns new objectbut you can modify the existing object in placealways returns reference to the filled object in [ ] df fillna( inplace=truein [ ]df out[ ] - - - handling missing data www it-ebooks info