"ValueError: labels ['timestamp'] are not contained in the axis"
You have no headers in the file, so as you downloaded it, you got df where the column names are the first rows of data. You tried to access a colunm timestamp that does not exist.
Your u.data has no headers in it
$head u.data 196 242 3 881250949 186 302 3 891717742
So working with column names will not be possible unless headers are added. You can add headers to the u.data file, for example. I opened it in a text editor and added the line abc timestamp at the top (this is apparently a tab delimited file, so be careful not to use spaces in the header, otherwise it will break the format)
$head u.data abc timestamp 196 242 3 881250949 186 302 3 891717742
Now your code works and data.columns returns
Index([u'a', u'b', u'c', u'timestamp'], dtype='object')
And the rest of your working code is now
(100000, 4)
If you do not want to add headers
Or you can drop the timestamp of the column using the index (supposedly 3), we can do it with df.ix below, it selects all rows, columns with index 0 to index 2, thereby discarding the column with index 3
data.ix[:, 0:2]
source share