Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

Python - can't import pandas

Writer 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 DataFrame

My code is:

from pandas import DataFrame

Another 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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy