Error: "Spyder was unable to retrieve the value of this variable" after updating pandas to 1.4.0, how to solve it?

Error: "Spyder was unable to retrieve the value of this variable" after updating pandas to 1.4.0, how to solve it?

不确定从 cmd 手动更新包后这是否是 Spyder 的常见问题,但就我而言,我将 Pandas 包更新为 1.4.0使用 cmd,在此之前一切正常,但在这样做之后,我的 Spyder 环境在尝试显示简单的 df:

时抛出以下错误

我 运行 的代码是:

import pandas as pd

#column names
column_names = ["Time", "Currency", "Volatility expected", "Event", "Actual", "Forecast", "Previous"]

#create a dataframe including the column names
df = pd.DataFrame(columns=column_names)

值得一提的是,如果我在 spyder 控制台中键入 df,我会得到存储在 df 变量中的信息:

我唯一的问题是,当我在 Variable Explorer

中单击它时,我看不到该 df 的详细信息

好像my issue will be solved at the end of this month.

所以,我不得不使用 cmd 上的 pip install -Iv --user pandas==1.3.5 和 [=14= 上的 conda install pandas==1.3.5 将我的 Pandas 软件包降级到 1.3.5 版本] 环境。

之后,我的变量浏览器运行顺利: