-1
J'ai écrit le code suivant en python.Importé un fichier xlsx en python, mais il génère une erreur
import pandas as pd
a=pd.ExcelFile(panda.xlsx)
Il donne cette erreur:
Traceback (most recent call last):
File "<pyshell#15>", line 1, in <module>
s=pd.ExcelFile("panda1.xls")
File "C:\Users\nj185047\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\excel.py", line 232, in __init__
import xlrd # throw an ImportError if we need to
ModuleNotFoundError: No module named 'xlrd'
J'ai essayé d'installer dans cmd, il donne l'erreur suivante, C: \ Users \ nj185047 \ AppData \ Local \ Programs \ Python \ Python36-32 \ Scripts> sudo PIP3 xlrd 'sudo' n'est pas reconnu comme une commande interne ou externe, un fichier exécutable ou un fichier batch. C: \ Utilisateurs \ nj185047 \ AppData \ Local \ Programmes \ Python \ Python36-32 \ Scripts> – Niharika
Ah, oui. Si vous n'utilisez pas Linux, supprimez "sudo". –