Skip to content

Instantly share code, notes, and snippets.

@rshyam1
Created May 16, 2016 00:27
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/5fa6632260cd07dd04cc9af56e793232 to your computer and use it in GitHub Desktop.
Save rshyam1/5fa6632260cd07dd04cc9af56e793232 to your computer and use it in GitHub Desktop.
#########################################################################################################################
# Summarizing the full df containing more than 22 millions rows by grouping by year,state,gender and then finding the sum
#########################################################################################################################
home_all_year_borr_male_female_only_count= group_by(home_all_year_borr_male_female_only,Year,US.Postal.code,Borrower.Gender) %>% summarise(Borrower.Gender.count=n())
dim(home_all_year_borr_male_female_only_count)
#540 4 !!! That makes perfect sense , 5 years * 54 states * 2 gender
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment