![]() In the previous version, using the standard library, once the data is loaded we no longer to keep the file open. items ( f, "item" ): user = record repo = record if user not in user_to_repos : user_to_repos = set () user_to_repos. Import ijson user_to_repos = with open ( "large-file.json", "rb" ) as f : for record in ijson. There are a number of Python libraries that support this style of JSON parsing in the following example, I used the ijson library.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |