原文:用ISO-8859-1解決Python 'utf-8' codec can't decode bytes in position 924-925問題

在一次使用Python操作大量文件的過程中,出現了 utf codec can t decode bytes in position 編碼問題,於是上網搜索,發現一個靠譜的答案: As suggested by Mark Ransom, I found the right encoding for that problem. The encoding was ISO , so replacing ...

2019-09-03 18:51 0 1044 推薦指數:

查看詳情

'utf-8' codec can't decode byte 0xd0 in position 0問題

今天利用pd.read_csv(url)從網絡上讀取數據時出現了如下錯誤: 'utf-8' codec can't decode byte 0xd0 in position 0 問題原因:網絡上的這個文件不是 UTF8 編碼的,而系統默認采用 UTF8 解碼,用UTF8編解碼器無法解碼該文 ...

Fri Oct 26 08:33:00 CST 2018 0 8522
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM