I have a saved JSON file in my disk which is 6.1 GB. My requirement is to keep that dictionary file memory so that I can replace keys with values in another file.
But I ended up getting Memory error each time when I try to do this step. Can anybody help me load dictionary without getting memory error?
Code is as follows:
with open('file_name.json') as f:
dictionary = json.load(f)
Your computer won't give acces to any amount of RAM to a process. You should check the limit on your system what the limit is for your Python process, information there .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.