0
Hello, can anyone help understand why the notebook jupyter does not recognize the panda package?
created a virtual environment and installed the packages to analyze a set of Enem data, but when calling the notebook jupyter and typing: import pandas as pd
the message appears below.
NameError Traceback (most recent call last)
<ipython-input-3-0efef42136cf> in <module>
----> 1 microdadosEnem = pd.read_csv("brutos/microdados_enem_2018/DADOS/MICRODADOS_ENEM_2018.csv")
NameError: name 'pd' is not defined
Hello Michele, are you using Jupyter on your local machine, or through some website? And why make a virtual environment to use it? Yeah, the same is kind of a virtual isolated ambience.
– Elias Oliveira
Before importing the pandas use
!pip install pandas
with the exclamation mark in front. Then just rotate the cell– Paulo Marques
Hello @Elias Oliveira, I created a virtual environment and call the command prompt jupyter then go to the browser...
– Michele alves
Hello @Paulomarques, I’ll do what you said to see if it works...
– Michele alves
Got it, in that case just do as @Paulomarques said and use the ! Pip install pandas
– Elias Oliveira
The mistake is
NameError: name 'pd' is not defined
, and notImportError: No module named pandas
. I mean, you didn’t turn the remoteimport pandas as pd
and tried to use thepd
. Paulo already made a comment about this in Michele’s "answer" (which is not an answer and should be a comment), but I’m just pointing out.– AlexCiuffa