#26295·spyder

在使用来自外部插件的数据框编辑器时,绘制直方图时出现错误

作者: dpturibio创建于 2026年8月26日更新于 2026年9月29日
标签type:Bugcomponent:Variable Explorer

当使用插件中的 Dataframe 结构时,如果数据未与 VariableExplorer 关联,且选择了"Plot histogram"按钮,则 DataFrameView 类中的 plot_hist 方法、line self.namespacebrowser.plot(plot_function) 会出现错误,因为在这种情况下 namespacebrowser 为 None(因为未通过变量探索器进行初始化)。建议先检查 namespacebrowser,如下所示:

内容来源: spyder-ide/spyder