pandasgui 库中的模块 `bokeh.plotting` 中没有属性 `Figure`

问题描述 投票:0回答:1

我正在尝试使用 pandasgui 库,但无论我做什么,我总是收到错误:

module 'bokeh.plotting' has no attribute 'Figure'

这是代码:

import pandas as pd
from pandasgui import show
df = pd.DataFrame({'a':[1,2,3], 'b':[4,5,6], 'c':[7,8,9]})
show(df)

我试过了

from bokeh.plotting import Figure
from bokeh.plotting import *

python pandas jupyter-notebook bokeh pandasgui
1个回答
0
投票

Figure
(大写 F)很久以前就已被弃用,并在几年前的 Bokeh 3.0 中被删除,以消除 API 混乱。现在只剩下
figure
(小写 f)了。您使用的库需要相应更新,否则您需要降级到 Bokeh 2.x。

© www.soinside.com 2019 - 2024. All rights reserved.