Back to Blog
Cant decode byte 0xed pandas5/4/2023 Try: table=pd.read_csv(csv_or_excel_path,encoding='utf-8',sep=' ')Įxcept: table=pd.read_csv(csv_or_excel_path,encoding='utf-8',sep='\t')īy the way, the separator of the file is " ".Ī) I understand it would be easier to track down the problem if I could identify what's the character in "position 133", however I'm not sure how to find that out. Try: table=pd.read_csv(csv_or_excel_path,encoding='utf-8') Try:table=pd.read_csv(csv_or_excel_path,sep='\t') Try: table=pd.read_csv(csv_or_excel_path,sep=' ') Please, help as I am not able to open the CSV itself. I want to open a CSV using pandas and perform analysis on it. Try: table=pd.read_csv(csv_or_excel_path) Pandas: UnicodeDecodeError: utf-8 codec cant decode bytes in position 0-1: invalid continuation byte Ask Question Asked 2 years, 11 months ago Modified 2 years, 11 months ago Viewed 26k times 7 community. I'm building a set of try/excepts to include variations of data types but for this one I couldn't figure out how to prevent.
0 Comments
Read More
Leave a Reply. |