Pandas read the csv file path contains Chinese

When in Windows, use the path or file name pandas import the csv file that contains Chinese error, the solution:

import pandas as pd
f = open('D:/AI/第5课/Kaggle-Bike-sharing-competition/kaggle_bike_competition_train.csv')
df_train = pd.read_csv(f)
df_train.head()

So just fine.

Guess you like

Origin blog.csdn.net/xavier_muse/article/details/91950871