Python - can't import pandas
Sophia Terry
I get the same error whenever I want to run my code.
Traceback (most recent call last): File "paises.py", line 1, in <module> from pandas import DataFrame, Series File "/home/david/Documents/Projetos/Intro to Data Science/pandas.py", line 1, in <module> from pandas import DataFrame
ImportError: cannot import name DataFrameMy code is:
from pandas import DataFrameAnother Error:
Traceback (most recent call last): File "knowingPandas.py", line 1, in <module> import pandas as pd File "/home/david/Documents/Projetos/Intro to Data Science/pandas.py", line 1 adium-theme-ubuntu==0.3.4 ^
SyntaxError: invalid syntax 5 1 Answer
The problem here was with the name of the file I was trying to run. I changed the name of pandas.py to pta.py.