pd.read_excel('Headcount 2020.xlsx')HC=HC[cols[7]+[cols[0:7]]+cols[8:44]]TypeError: can only concatenate str (not "list") to str
然而,在我今天早上所遵循的示例中,使用相同的代码,它运行得非常完美。
如果在名为“file”的列表中找到文件,我将尝试将当前目录中的文件从当前目录移到当前目录中名为'python‘的目录。结果,名为'1245‘的文件将保留在同一个目录中。for f in os.listdir('.'): shutil.move(f, 'python')
这会引发以下错误: TypeError:预期的str、字节或os.PathLike对象,而不是列表