且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Python:使用相对路径导入Excel文件

更新时间:2023-02-10 07:56:26

感谢您的建议.他们都没有工作,但我找到了解决方案.

Thanks for your suggestions. None of them did work but I found a solution.

df = pd.read_excel(r'./../B_folder/2_file.xlsx')

这对我来说很好用.

因此,如果有人遇到相同的问题,希望对您有所帮助.

So if anybody faces the same problem, I hope this helps.