Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import os
- import shutil
- df = pd.read_csv('your.csv')
- for i, row in df.iterrows():
- os.makedirs(f"{row['label']}", exist_ok=True)
- shutil.move(row['filename'], f"{row['label']}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement