New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One problem reveals when I rerun the program #10
Comments
I got a similar error because I was using Python 3 to execute the code. To rectify it, I changed the numerize function to:
You can try using the above function and let me know if it works for you! All the best! |
It works my problem fine, there are bugs for me to keep on going though. Thank you! |
There are many changes to make if you are using Python 3. All the best! |
@shrawansapre Do you have the python 3.5+ file for this repo. If so could you share that. I am struggling to make it work on python 3.5+. Thanks |
This looks to give an error later on |
Hi Dawen,
I am writing to ask if you ever had the following error when you implemented your program, which is shown in the snapshot attached with this message. This error came out after I converted your Jupyter notebook file into a python file named old_code.py and tried to run it.
After filtering, there are 9990682 watching events from 136677 users and 20720 movies (sparsity: 0.353%)
0 users sampled
1000 users sampled
2000 users sampled
3000 users sampled
4000 users sampled
5000 users sampled
6000 users sampled
7000 users sampled
8000 users sampled
9000 users sampled
0 users sampled
1000 users sampled
2000 users sampled
3000 users sampled
4000 users sampled
5000 users sampled
6000 users sampled
7000 users sampled
8000 users sampled
9000 users sampled
Traceback (most recent call last):
File "old_code.py", line 250, in
train_data = numerize(train_plays)
File "old_code.py", line 244, in numerize
return pd.DataFrame(data={'uid': uid, 'sid': sid}, columns=['uid', 'sid'])
File "C:\Software\Anaconda\lib\site-packages\pandas\core\frame.py", line 348, in init
mgr = self._init_dict(data, index, columns, dtype=dtype)
File "C:\Software\Anaconda\lib\site-packages\pandas\core\frame.py", line 439, in _init_dict
index = extract_index(arrays[~missing])
File "C:\Software\Anaconda\lib\site-packages\pandas\core\frame.py", line 7349, in extract_index
raw_lengths.append(len(v))
TypeError: object of type 'map' has no len()
Apologize for such inconvenience and thank you for your attention meanwhile! :)
The text was updated successfully, but these errors were encountered: