Reputation: 23
I have tried to run a script with pandas in python3, but it appears to have an terrible error I even don't understand. Note: my script is "gh.py" and has an error in line 1, i can't import pandas.
File "gh.py", line 1
from pandas as pd
^
SyntaxError: invalid syntax
Upvotes: 2
Views: 41
Reputation: 500
Maybe you’re using python2 instead of python3. Use the appropiate syntax to import pandas and also try
pip install pandas
Upvotes: 0