no attribute `Figure` in module `bokeh.plotting` in pandasgui library

553 Views Asked by At

I am trying to use the library pandasgui but no matter what I do I always get the error:

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

Here is the code:

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)

I tried from bokeh.plotting import Figure and from bokeh.plotting import *

1

There are 1 best solutions below

4
On BEST ANSWER

Figure (capital F) was deprecated very long ago, and removed in Bokeh 3.0 several years ago, in order to remove an API confusion. Now there is only the figure (lower-case f) remaining. The library you are using will need to update itself accordingly, or else you will need to downgrade to Bokeh 2.x.