One more way to eliminate this kind of error is you can save this csv file in utf-8 csv format.
This can be done by opening this csv file in excel and saving it as the format metioned.
One more way to eliminate this kind of error is you can save this csv file in utf-8 csv format.
This can be done by opening this csv file in excel and saving it as the format metioned.
When I execute this line ''data = pd.read_csv('UKretail.csv')'', I get a long error conveying
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa3 in position 28: invalid start byte
But when I add nrows = 20 i.e '' data = pd.read_csv('UKretail.csv', nrows = 20)'', this code executes smoothly without any error. Why only pd.read_csv('UKretail.csv') is throwing error? What change takes place by adding only one argument i.e nrows = 20?