Celeb Glow
news | March 15, 2026

running Python script within Spyder does not show output in Console

I've created a script in Spyder. If I step through each line I see the output in the console. HOwever, if I click on the green "play" button to run the script, I see this message in the console,

pic of console message

However, if I F9 the last instruction, I get the expected output,pic of console after F9 last script instruction

Here is the code:

path="C:/Users/jeriv/Documents/Python/ML_Andew_NG/data"
os.chdir(path)
file="ex1data1.txt"
data = pd.read_csv(file, header=None, names=['Population', 'Profit'])
data.head()

Any help is appreciated.

2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

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