import shutil
import os
for f in os.listdir(path='.'):
if os.path.splitext(f)[1]=='.csv':
dir_name=os.path.splitext(f)[0]
os.mkdir(dir_name)
shutil.move(f, dir_name)
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme