“Error unicode Python” Código de respuesta

Error de personaje de Python Unicode

# 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")
Trained Tuna

Error unicode 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"
Good Grebe

Respuestas similares a “Error unicode Python”

Preguntas similares a “Error unicode Python”

Más respuestas relacionadas con “Error unicode Python” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código