推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
oldbird
V2EX  ›  Python

请教 vscode 里 jupyter 怎么使用 pyecharts?

  •  
  •   oldbird · Feb 29, 2020 · 3523 views
    This topic created in 2403 days ago, the information mentioned may be changed or developed.

    在浏览器的 jupyter 里使用 pyechart 正常显示图片, 在 vscode 的 jupyter 里,看不见 参考了 https://zhuanlan.zhihu.com/p/85753997?from_voters_page=true

    from pyecharts.globals import CurrentConfig, NotebookType

    CurrentConfig.NOTEBOOK_TYPE = NotebookType.JUPYTER_LAB

    from pyecharts.charts import Bar

    bar = Bar()

    bar.add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"])

    bar.add_yaxis("商家 A", [5, 20, 36, 10, 75, 90])

    bar.load_javascript()

    bar.render_notebook()

    最后两行各自一个 cell 也试了。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1275 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 23:56 · PVG 07:56 · LAX 16:56 · JFK 19:56
    ♥ Do have faith in what you're doing.