Skip to content

Instantly share code, notes, and snippets.

@Harshit1694
Created June 21, 2019 08:52
Show Gist options
  • Save Harshit1694/165145f8963868d3e28cbfa81423b54a to your computer and use it in GitHub Desktop.
Save Harshit1694/165145f8963868d3e28cbfa81423b54a to your computer and use it in GitHub Desktop.
# Giving column names for each CSV .
# Column names available in the readme file
#Reading users file
data_user<-read.csv(file.choose(),sep = '|',header = F,
col.names = c('user_id', 'age', 'sex', 'occupation', 'zip_code'))
#Reading ratings file
data_rat<-read.csv(file.choose(),sep = '\t',header = F,
col.names = c('user_id', 'movie_id', 'rating', 'unix_timestamp'))
#Reading items file
data_item<-read.csv(file.choose(),sep = '|',header = F,
col.names = c('movie id', 'movie title' ,'release date','video release date', 'IMDb URL', 'unknown', 'Action', 'Adventure',
'Animation', 'Children\'s', 'Comedy', 'Crime', 'Documentary', 'Drama', 'Fantasy',
'Film-Noir', 'Horror', 'Musical', 'Mystery', 'Romance', 'Sci-Fi', 'Thriller', 'War', 'Western'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment