Created
August 15, 2022 10:40
-
-
Save Rubix982/49948b9887e2ffead3ed58676961b402 to your computer and use it in GitHub Desktop.
Saving the data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Lets first save all of the data as a JSON | |
with open('image_id_list.json', 'w') as file_pointer: | |
json.dump(image_id_list, file_pointer, indent=4) | |
# For each collection item, lets remove the property data to get a smaller JSON version | |
for iter in image_id_list: | |
del iter['property_data'] | |
# Lets save this version of the data as a JSON to recollect at any point in time | |
with open('image_id_list_without_property.json', 'w') as file_pointer: | |
json.dump(image_id_list, file_pointer, indent=4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment