I want to ask about my problem. I want to create a recommender system in python. I already create a latent function matrix and stored it in csv that contain data like this:
index 1 2 3 ... 89
1 a b c ... z
2 d e f ... y
...
30 g h i ... x
For the recommender system, I used turicreate library but turicreate can only accept if the structure of csv like this:
col index value
1 1 a
1 2 d
...
89 30 x
Can someone help me for this problem? or can someone give another suggestions for this problem? Because I am a beginner in python 3. Thanks
if you don't mind using pandas:
pandas.DataFrame.stack
If you want to do it in pure python, something like this can work: