Python Forum
How to sort image files according to a metadata file?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to sort image files according to a metadata file?
#2
You can use pandas.read_csv to load csv into Python memory as Pandas.DataFrame instance. Further, you can use DataFrame's groupby method. To use it you will need to specify desired grouping variables (e.g. 'dx_type' in your case). Finally, you can iterate over all groups, find which files belong to each group (from image_id column) and copy these files to specific directories.
Reply


Messages In This Thread
RE: How to sort image files according to a metadata file? - by scidam - Dec-05-2019, 11:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  No module named 'importlib.metadata' EdVS 3 1,357 Jan-30-2025, 09:55 AM
Last Post: Larz60+
  Metadata Xls file documnet properties Andrew_andy9642 0 694 Aug-29-2024, 04:46 PM
Last Post: Andrew_andy9642
  Filer and sort files by modification time in a directory tester_V 5 2,870 May-02-2024, 05:39 PM
Last Post: tester_V
  error "cannot identify image file" part way through running hatflyer 0 2,137 Nov-02-2023, 11:45 PM
Last Post: hatflyer
Question image manipulation (cropping and MetaData) SpongeB0B 4 2,616 Jul-03-2023, 06:35 PM
Last Post: SpongeB0B
  is it possible to copy image from email and place into excel file? cubangt 3 2,762 Nov-30-2022, 05:11 PM
Last Post: snippsat
  New2Python: Help with Importing/Mapping Image Src to Image Code in File CluelessITguy 0 1,290 Nov-17-2022, 04:46 PM
Last Post: CluelessITguy
  How to sort .csv file test log which item first fail and paint color SamLiu 24 9,837 Sep-03-2022, 07:32 AM
Last Post: Pedroski55
Photo a.sort() == b.sort() all the time 3lnyn0 1 2,129 Apr-19-2022, 06:50 PM
Last Post: Gribouillis
  AttributeError: 'function' object has no attribute 'metadata 3lnyn0 5 7,859 Mar-28-2022, 04:42 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020