rishikasrinivas commited on
Commit
48a8166
·
verified ·
1 Parent(s): 19e4c74

Create load_data.py

Browse files
Files changed (1) hide show
  1. load_data.py +10 -0
load_data.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ def loadFileIntoDict(file):
2
+ with open(file, "r") as f:
3
+ lines = f.readlines()
4
+ f.close()
5
+
6
+ D = {}
7
+ for index_genre_pair in lines:
8
+ index, genre = index_genre_pair.split(',')
9
+ D[int(index)] = genre[:-1]
10
+ return D