为什么我不观察我在 spyder 中创建的变量?

Why do not I observe the variables that I create in spyder?

我正在使用 spyder 并拥有 Python 版本:3.5.2 Anaconda custom (64-bit) 一开始我导入了我需要的所有库:

import numpy as np
import os
import matplotlib.pyplot as plt
import pandas as pd

指定路径并上传数据集:

os.chdir('C:\Users\...\Data_Preprocessing')
dataset = pd.read_csv('Data.csv')

我可以在变量浏览器中观察我的数据集 window。但是当我尝试使用如下命令创建自变量矩阵时:

X = dataset.ix[:, :-1].values

X = dataset.iloc[:, :-1].values
我得到:

Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users...\lib\threading.py", line 914, in _bootstrap_inner self.run() File "C:\Users...\lib\site-packages\spyderlib\widgets\externalshell\monitor.py", line 569, in run self.update_remote_view() File "C:\Users...\lib\site-packages\spyderlib\widgets\externalshell\monitor.py", line 450, in update_remote_view remote_view = make_remote_view(ns, settings, more_excluded_names) File "C:\Users...\lib\site-packages\spyderlib\widgets\externalshell\monitor.py", line 79, in make_remote_view minmax=settings['minmax']) File "C:\Users...\lib\site-packages\spyderlib\widgets\dicteditorutils.py", line 225, in value_to_display return display UnboundLocalError: local variable 'display' referenced before assignment

我仍然可以计算所有我需要的东西,但我没有在变量资源管理器中观察到创建的变量。我如何观察它们以及为什么会发生这种情况?

(此处是 Spyder 开发人员) 这是一个错误,已在 Spyder 2.3.9 中修复。请更新以修复它。