Reputation: 151
import pandas as pd
df = pd.read_csv("E:\YangJian\jupyter notebook\movie_metadata.csv")
train = pd.read_csv("E:\YangJian\jupyter notebook\train_modified.csv")
when i run "df",it's ok,but when i run "train",it's turns out as follows: File b'E:\YangJian\jupyter notebook\train_modified.csv' does not exist
Upvotes: 1
Views: 3604
Reputation: 81604
The second path contains \t
that becomes a tab character. It turns the path to 'E:\YangJian\jupyter notebook rain_modified.csv'
The solution is to always use raw strings when dealing with paths. Add r
before the string literal:
df = pd.read_csv(r"E:\YangJian\jupyter notebook\movie_metadata.csv")
# ^
train = pd.read_csv(r"E:\YangJian\jupyter notebook\train_modified.csv")
# ^
Upvotes: 2