Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ageek/6f22f440a08c579ae1a7 to your computer and use it in GitHub Desktop.
Save ageek/6f22f440a08c579ae1a7 to your computer and use it in GitHub Desktop.
library(dplyr)
#train <- read.csv("train.csv")
test <- read.csv("test_v2.csv")
last_items <- test %.%
group_by(customer_ID) %.%
filter(shopping_pt==max(shopping_pt)) %.%
mutate(plan=paste(A,B,C,D,E,F,G,sep='')) %.%
select(customer_ID,plan)
write.csv(last_items,"submit.csv",
row.names=F,quote=F)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment