I used Python2.7.10 before. Recently I change to python 3.6. However, when I want to import csv files it fails. My simple code is like this and I think it should work well in Python2.
data = pd.read_csv('data.csv')
And the error returns like:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
What does this mean and how can I solve this problem? Thanks.
Update
I've already solved it adding something like this:
data = pd.read_csv(data.csv',sep='\t',encoding='utf-16')
Although I still don't know why it works, thanks for your help anyway.