I have a 0.7 GB MongoDB database containing tweets that I\'m trying to load into a dataframe. However, I get an error.
MemoryError:
My
I've modified my code to the following:
cursor = tweets.find(fields=['id'])
tweet_fields = ['id']
result = DataFrame(list(cursor), columns = tweet_fields)
By adding the fields parameter in the find() function I restricted the output. Which means that I'm not loading every field but only the selected fields into the DataFrame. Everything works fine now.