
ratings_dat = open('../data/movielens-1m/ratings.dat', 'r')

ratings_csv = open('../data/movielens-1m/ratings_without_timestamp.txt', 'w')

for line in ratings_dat:
	arr = line.split('::')
	new_line = ','.join(arr[:3])+'\n';

	ratings_csv.write(new_line)

ratings_dat.close()
ratings_csv.close()



ratings_dat = open('../data/movielens-1m/users.dat', 'r')
ratings_csv = open('../data/movielens-1m/users.txt', 'w')

for line in ratings_dat:
	arr = line.split('::')
	new_line = '\t'.join(arr)

	ratings_csv.write(new_line)

ratings_dat.close()
ratings_csv.close()

Convert data delimiter from :: to tab character.
Convert data delimiter from :: to tab character.

  
- ratings_dat = open('../data/movielens-1m/ratings.dat', 'r')
  
+ 
+ ratings_dat = open('../data/movielens-1m/users.dat', 'r')
- ratings_csv = open('../data/movielens-1m/ratings_without_timestamp.txt', 'w')
+ ratings_csv = open('../data/movielens-1m/users.txt', 'w')
  
  for line in ratings_dat:
  	arr = line.split('::')
- 	new_line = ','.join(arr[:3])+'\n';
+ 	new_line = '\t'.join(arr)
  
  	ratings_csv.write(new_line)
  
  ratings_dat.close()
  ratings_csv.close()
+ 
Convert data delimiter from :: to tab character.
## Code Before:

ratings_dat = open('../data/movielens-1m/ratings.dat', 'r')

ratings_csv = open('../data/movielens-1m/ratings_without_timestamp.txt', 'w')

for line in ratings_dat:
	arr = line.split('::')
	new_line = ','.join(arr[:3])+'\n';

	ratings_csv.write(new_line)

ratings_dat.close()
ratings_csv.close()
## Instruction:
Convert data delimiter from :: to tab character.
## Code After:



ratings_dat = open('../data/movielens-1m/users.dat', 'r')
ratings_csv = open('../data/movielens-1m/users.txt', 'w')

for line in ratings_dat:
	arr = line.split('::')
	new_line = '\t'.join(arr)

	ratings_csv.write(new_line)

ratings_dat.close()
ratings_csv.close()
