I have tried to read an xlsx file which is stored in my system using jupyter notebook.I had run the jupyter notebook from the present directory where my file is present.But it is showing an error as "module not found error".


The below code should able to access /read your excel file
import pandas as pd
path = ('...\\filename.xlsx')
xl = pd.ExcelFile(path)
print(xl.sheet_names)
The above command shows the sheets in a xlsx file
df1 = xl.parse('Sheet1')
Above command parses the sheet required
Same outout, but this one worked for me.
import pandas as pd
df = pd.read_excel (r'C:\Users\(NAME)\Desktop\(FILENAME).xlsx')
print (df)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With