i have the amazon baby dataset. it is splitter in train test and val.tsv. each of these…
- User
i have the amazon baby dataset. it is splitter in train test and val.tsv. each of these file is a tsv where the first column is the item asin, then there are 2 other columns. i just need to focus on the first one. then I have another file, let's call it onehot.tsv, this is also a tsv where the first column are the asin, the other columns are other infos.
i want you to: merge the train,test and val files. then extract the unique asin and finally eliminate from the onehot.tsv, the lines where that given asin is not present on train+test+val. so the final file must be a new onehot.tsv file where the asin are the same of the ones present in train.test.val
these are some example of train,test and val tsv files: A2LL1TGG90977E 097293751X 5.0 A5G19RYX8599E 097293751X 5.0 A2496A4EWMLQ7 097293751X 4.0 A3NMPMELAZC8ZY 097293751X 5.0
while this is an example of the onehot.tsv file:
B000JOOG9I 0 0 0 0 0 0 0 0 0 0 0 ... B002GP76K4 0 0 0 0 0 0 0 0 0 0 0 ... B002GP76K4 0 0 0 0 0 0 0 0 0 0 0 ...
provide solely the full python script. moreover, for each train test and val, please print the number of total and also the number of unique asin, so i can keep track of them. the same for the onehot filtered file. i want to see the changes, be verbose
- Assistant