Hi. I am currently in the Predicting the Stock Market Guided Project and am terribly confused with the interface. As you can see below, all that I want to do is see the first few rows of my data set. However, since there is no “run” button, I do not know how to do this. I assume that I need to do something in the terminal view, but don’t know how to accomplish that. The instructions tell me that if I am confused with the interface, I should complete this guided project. However, in trying to complete that guided project I run into the same issue as before, since I do not know how to run my code.
import pandas as pd
sp = pd.read_csv("sphist.csv")
Move to the folder where your python script is located, using the cd command. you can read more about moving in and out of folders in the terminal here.
For example, your predict.py script is in the scripts folder, so you run cd scripts.
When you are in the script folder, type python predict.py in the terminal to run your predict.py script file.
Generally, to run a python script in the terminal, you use python followed by the name of the python script including its extension.
Lastly, use the print() function as in print(sp.head()) to display the first few rows.