erdogant / bnlearn

Python package for Causal Discovery by learning the graphical structure of Bayesian networks. Structure Learning, Parameter Learning, Inferences, Sampling methods.
https://erdogant.github.io/bnlearn
Other
482 stars 46 forks source link

Error when trying to run example code #96

Closed serhiy-yevtushenko closed 7 months ago

serhiy-yevtushenko commented 9 months ago

When trying to run the following code from the documentation (https://erdogant.github.io/bnlearn/pages/html/Examples.html#parameter-learning)

import bnlearn as bn
df = bn.import_example('sprinkler')
print(tabulate(df.head(), tablefmt="grid", headers="keys"))

I'm getting the following error:

    print(tabulate(df.head(), tablefmt="grid", headers="keys"))
NameError: name 'tabulate' is not defined

The installed version of bnlearn is 0.8.4

erdogant commented 8 months ago

I updated the pages because you need to install tabulate first and then import.

See link here