Created
March 6, 2022 13:58
-
-
Save amitness/a525a5c1a29493be67c74bb1990683bd to your computer and use it in GitHub Desktop.
zipfile add files
This file contains hidden or 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
from zipfile import ZipFile | |
for annotator, subset in annotation_df.groupby('annotator'): | |
with ZipFile(f'{annotator}.zip', 'w') as z: | |
for path in subset['image_path']: | |
z.write(path, os.path.basename(path)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment