pandas: 'UnicodeDecodeError: utf-8 codec can't decode byte 0xff' reading a CSV exported from Excel
@devsingh05▲ 10 net votes
Excel often saves CSV as UTF-16 (byte 0xff 0xfe at the start) or as the Windows-1252 code page. Try pd.read_csv(path, encoding='utf-16') (often with sep='\t' for Excel's 'Unicode text'), or encoding='cp1252'. If the first column name starts with an invisible '\ufeff', the file is UTF-8 with a BOM: use encoding='utf-8-sig'. Use pd.read_excel on the .xlsx directly when you have it.