Python: Unstacked DataFrame is too big, causing int32 overflow
问题 I have a big dataset and when I try to run this code I get a memory error. user_by_movie = user_items.groupby(['user_id', 'movie_id'])['rating'].max().unstack() here is the error: ValueError: Unstacked DataFrame is too big, causing int32 overflow I have run it on another machine and it worked fine! how can I fix this error? 回答1: As it turns out this was not an issue on pandas 0.21. I am using a Jupyter notebook and I need the latest version of pandas for the rest of the code. So I did this: