新分配的变量未显示在Spyder的变量资源管理器中 [英] Newly-assignmed variables not showing up in Spyder's variable explorer

查看:1704
本文介绍了新分配的变量未显示在Spyder的变量资源管理器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Spyder上编写Python.请在下面查看我的代码:

I'm writing Python on Spyder. Please see my code below:

import pandas as pd

data = pd.io.excel.read_excel('Data.xls')
CMT_column = data['CMT']

数据"包含称为"CMT"的列.我想做的是创建一个名为"CMT_column"的变量,其中包含"CMT"列的值.

"data" contains a column called "CMT." What I'm trying to do is create a variable called "CMT_column" that contains the values of the "CMT" column.

这是问题所在.运行代码后,变量浏览器中仅显示数据". "CMT_column"不存在.但是,如果我在IPython控制台中调用"CMT_column",它将按预期显示"CMT"的值.因此,我猜该变量毕竟已经创建了,但是为什么在变量资源管理器中看不到它?

Here's the problem. After I run the code, only "data" appears in the variable explorer. "CMT_column" is not there. But if I call "CMT_column" in the IPython console, it shows the values of "CMT" as expected. So I guess the variable has been created after all, but why is it not visible in the variable explore?

在此先感谢您的帮助.

推荐答案

转到变量资源管理器"窗口.

Go to Variable explorer window.

然后您将在右侧具有选项按钮.

Then you have options button right hand side.

单击它,取消选中排除所有大写首选项"选项,如图所示.

Click on it,Untick the option Exclude all uppercase preferences as shown in image.

这篇关于新分配的变量未显示在Spyder的变量资源管理器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆