下面是我的项目截图。虽然我可以用pd.read_csv("./_files_inner/games.csv")
很容易地访问我的_files_inner
文件夹,但我发现访问我的“根”文件夹_files
很棘手
如果您看到我的projectexplorer,我试图访问_files
,但没有指定绝对路径(即C:\\Users\\adhg\\dev\\py\\_files\\games.csv
),因为其他开发人员有不同的路径。你知道吗
问题:如何访问根_files
文件夹(不起作用)pd.read_csv("./_files/games.csv")
:
import pandas as pd
csv_result = pd.read_csv("./_files/games.csv") #will not work
csv_result = pd.read_csv("./_files_inner/games.csv") #works
print csv_result
try using ../_files_inner/games.csv
相关问题 更多 >
编程相关推荐