(unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape
import pandas
# read the file
pandas.read_csv("C:\\Users\\itsmycode\\Desktop\\test.csv")
(unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape
import pandas
# read the file
pandas.read_csv("C:\\Users\\itsmycode\\Desktop\\test.csv")
unicodeescape codec can't decode bytes
# if you get this error you may need to specify an engine
df = pd.read_excel(r"C:\path\to\file.xlsx", engine='openpyxl')
# if you get the utf-8 codec can't decode byte error
# you might need to add encoding = "ISO-8859-1" to the end of the csv import
pd.read_csv(r'\\path\to\file.csv',encoding = "ISO-8859-1")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us