Answers for "python unicode character error"

0

python unicode character error

# 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")
Posted by: Guest on April-26-2022
0

unicode error python

# You either need to duplicate all backslashes:
"C:\\Users\\Eric\\Desktop\\beeline.txt"
# Or prefix the string with r (to produce a raw string):
r"C:\Users\Eric\Desktop\beeline.txt"
Posted by: Guest on February-15-2021

Code answers related to "python unicode character error"

Python Answers by Framework

Browse Popular Code Answers by Language