Skip to content

Instantly share code, notes, and snippets.

@rshyam1
Last active May 15, 2016 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rshyam1/a5bbff13347eabb508838c9de2eb3876 to your computer and use it in GitHub Desktop.
Save rshyam1/a5bbff13347eabb508838c9de2eb3876 to your computer and use it in GitHub Desktop.
###################################
#####Checking Missing Data#####
##################################
#Checking how many US_Postal_codes have 00
sum(home_FNM_2014$V3 == 00)
# 2014 Fannie Mac have 171 rows whose state code is 00
# Deleting those rows
fnm_rows_0=which(home_FNM_2014$V3== 0)
# array of 171 row numbers
#Deleting those rows, this is the data frame without those rows
#V1 without 171 rows whose postal code is 0
home_FNM_2014_1=home_FNM_2014[-fnm_rows_0,]
# Rewriting the
dim(home_FNM_2014_1)
#1899558 39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment