Skip to content

Instantly share code, notes, and snippets.

@Tibingeo
Last active June 12, 2018 06:42
Show Gist options
  • Save Tibingeo/408502ad3227152ac376c8d1bd5718fe to your computer and use it in GitHub Desktop.
Save Tibingeo/408502ad3227152ac376c8d1bd5718fe to your computer and use it in GitHub Desktop.
Upload and split the file into 2 parts. Please use this - http://pinetools.com/split-files
In Python:
import pandas as pd
data1 = pd.read_table("/data/ratings.dat.000", sep="\:\:", header=None, engine='python')
data2 = pd.read_table("/data/ratings.dat.001", sep="\:\:", header=None, engine='python')
data = data1.append(data2)
In R:
data1 = read.csv("/data/ratings.dat.000", sep = ":", colClasses = c(NA, "NULL"), header = FALSE)
data2 = read.csv("/data/ratings.dat.001", sep = ":", colClasses = c(NA, "NULL"), header = FALSE)
data = rbind(data1, data2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment