Unable to read .xlsx file using pandas
A. M. Thomas [PETech MIET MBA]
thomasomea at gmail.com
Thu Dec 3 07:13:59 EST 2020
Kindly help manage read .xlsx files using pandas, thank you
import numpy as np
import pandas as pd
from pandas import Series, DataFrame
excelfile = pd.ExcelFile('C:\Users\THOMAS\Documents/Hash Analytics
Internship - DemoS2.xlsx')
dframe = excelfile.parse('Sheet10')
print (dframe)
C:\Users\THOMAS\AppData\Local\Programs\Python\Python39\python.exe
"C:/Users/THOMAS/PycharmProjects/Assignment#2/code File.py"
File "C:\Users\THOMAS\PycharmProjects\Assignment#2\code File.py", line 5
excelfile = pd.ExcelFile('C:\Users\THOMAS\Documents/Hash Analytics
Internship - DemoS2.xlsx')
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in
position 2-3: truncated \UXXXXXXXX escape
Process finished with exit code 1
--
Best Regards,
*A. M. Thomas*
Electrical & Solar Systems Expert
*THE GUY BEHIND THE SCENE*
Cell: +254 723 309 157 / +254 731 406 125
Email: thomasomea at gmail.com / thomaso.engineer at gmail.com
"Alternative energy for real and sustainable development that we need"
More information about the Python-list
mailing list