更新时间:2022-11-30 16:00:49
正如@Grr所说,您不应使用单个反斜杠,因为这是一个特殊字符.试试:
As @Grr said, You should not use a single backslash because is a special character. Try:
products = pd.read_csv('C:/amazon_baby.csv')
这适用于Windows和类似Unix的操作系统.另外,您可以使用os模块:
This works for Windows, and Unix-like OS. Also, you can use the os module:
os.path.join('C:/', 'amazon_baby.csv')