每当我想运行我的代码时,我都会遇到同样的错误。
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
我的代码是:
from pandas import DataFrame
另一个错误:
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
这里的问题是我试图运行的文件的名称。我将名称更改
pandas.py
为pta.py
。