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
  error "cannot identify image file" part way through running hatflyer 0 681 Nov-02-2023, 11:45 PM
Last Post: hatflyer
Question image manipulation (cropping and MetaData) SpongeB0B 4 1,169 Jul-03-2023, 06:35 PM
Last Post: SpongeB0B
  is it possible to copy image from email and place into excel file? cubangt 3 1,280 Nov-30-2022, 05:11 PM
Last Post: snippsat
  New2Python: Help with Importing/Mapping Image Src to Image Code in File CluelessITguy 0 729 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 4,921 Sep-03-2022, 07:32 AM
Last Post: Pedroski55
Photo a.sort() == b.sort() all the time 3lnyn0 1 1,324 Apr-19-2022, 06:50 PM
Last Post: Gribouillis
  AttributeError: 'function' object has no attribute 'metadata 3lnyn0 5 4,646 Mar-28-2022, 04:42 PM
Last Post: Larz60+
  How to open/load image .tiff files > 2 GB ? hobbyist 1 2,464 Aug-19-2021, 12:50 AM
Last Post: Larz60+
  Sort data from JSON file Dummy_in_programming 2 2,467 Jan-04-2021, 06:17 PM
Last Post: deanhystad
  Count & Sort occurrences of text in a file oradba4u 7 3,095 Sep-06-2020, 03:23 PM
Last Post: oradba4u

Forum Jump:

User Panel Messages

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