【发布时间】:2025-12-21 00:15:15
【问题描述】:
我刚开始在 Pycharm 工作。
我的问题是,当我在编辑器中编写代码并运行它时。
“运行”选项卡显示:“进程以退出代码 0 完成”。
它执行我的代码,但我没有看到它。
但是,当我直接在 Python 控制台中编写代码时,我可以看到代码。
我不知道这是完全正常还是我没有正确配置某些东西。
我的 TODO 选项卡也没有识别项目并显示“在 0 个文件中找到 0 个 TODO 项”
谢谢!
# Retrieve TSLA data from Quandl
tesla = quandl.get('WIKI/TSLA')
# Retrieve the GM data from Quandl
gm = quandl.get('WIKI/GM')
gm.head(5)
# Plot Data
import matplotlib.pyplot as plt
# Plot for gm stock
plt.plot(gm.index, gm['Adj. Close'])
plt.title('GM Stock Price')
plt.ylabel('Price ($)');
plt.show()
【问题讨论】:
-
可能你的代码没有输出,而在 Python 控制台中,每个返回的值都会打印到控制台中。请分享您的代码,我们将能够更具体地为您提供帮助...
-
我们可以看看你的代码吗?您可能没有任何打印语句或忘记运行您的函数。
-
# 从 Quandl 检索 TSLA 数据 tesla = quandl.get('WIKI/TSLA') # 从 Quandl 检索 GM 数据 gm = quandl.get('WIKI/GM') gm.head(5 ) # 绘制数据 import matplotlib.pyplot as plt # 绘制 gm 股票 plt.plot(gm.index, gm['Adj. Close']) plt.title('GM Stock Price') plt.ylabel('Price ($ )'); plt.show()
-
现在工作了吗。我尝试了代码,我不得不等待几秒钟直到情节出现
标签: python configuration pycharm