使用Glob检查每个导演中的每个文件
因此,我对Glob有一个问题,即它为我进行的任何搜索返回一个空列表[]
。我认为这是因为我在错误的目录中。因此,我将如何使用Glob搜索记录下的所有文件。 (请参阅图像)我试图找到所需日期的出勤记录。 (他们通过日期,搜索并返回其中的数据(使用PD))
我尝试过的内容:
gen = glob.iglob(date)
for x in gen:
print(x)
So I have a problem with glob that it returns an empty list []
for any search I do. I assume it is because I am in the wrong directory. So How would I use glob to search all the files under records. (see image) I am trying to find the attendance records for the desired date. (They pass in date, it searches, and returns the data in it (using pd))
What I have tried:
gen = glob.iglob(date)
for x in gen:
print(x)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这最终为我锻炼。 :d
This ended up working out for me. :D