python
1import pathlib 2import openpyxl 3import csv 4 5lwb = openpyxl.Workbook() 6lsh = lwb.active 7list_row = 1 8path = pathlib.Path(r"D:\Users\xxxx\Documents\excel_python\data\sales") 9for pass_obj in path.iterdir(): 10 if pass_obj.match("*.csv"):
FileNotFoundError Traceback (most recent call last)
<ipython-input-10-f403cc0e4ee9> in <module>()
7 list_row = 1
8 path = pathlib.Path(r"D:\Users\k-kogure\Documents\excel_python\data\sales")
----> 9 for pass_obj in path.iterdir():
10 if pass_obj.match("*.csv"):
11 wb = openpyxl.load_workbook(pass_obj)
1 frames
/usr/lib/python3.6/pathlib.py in wrapped(pathobj, *args)
385 @functools.wraps(strfunc)
386 def wrapped(pathobj, *args):
--> 387 return strfunc(str(pathobj), *args)
388 return staticmethod(wrapped)
389
FileNotFoundError: [Errno 2] No such file or directory: 'D:\Users\k-kogure\Documents\excel_python\data\sales'
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/05/02 11:47