简体   繁体   中英

cufflinks `df.iplot()` doesn't work with vscode/jupyter

I'm trying to use cufflinks to plot a dataframe, and df.iplot() is not working––it does not return after 10s. I'm running from vscode + jupyter extension. plotly works fine. Any suggestions on what I am doing wrong?

import cufflinks as cf
cf.set_config_file(world_readable=True,theme='pearl')
df = cf.datagen.lines()
df.head()

# LLZ.LP    UPU.PN  PTJ.OF  ZIM.KK  ESA.OS
# 2015-01-01    0.911   -1.508  -1.818  0.900   -1.100
# 2015-01-02    0.123   -0.109  -2.074  0.731   -0.951
# 2015-01-03    0.389   0.794   -1.999  -1.705  -1.930
# 2015-01-04    -0.398  0.374   -2.358  -0.746  -2.740
# 2015-01-05    -0.828  -0.256  -2.572  0.362   -0.980


df.iplot() # does not return

I have plotly and cufflinks installed as follows:

conda install -c plotly plotly=5.10.0 
conda install "notebook>=5.3" "ipywidgets>=7.5" 
conda install -c conda-forge cufflinks-py

# conda list | grep -e plotly -e cufflinks
# cufflinks-py              0.17.3                     py_0    conda-forge
# plotly                    5.10.0                     py_0    plotly
# python-cufflinks          0.17.3                     py_0    conda-forge

I found an answer here: https://nbviewer.org/gist/santosjorge/5fdbe947496faf7af5e6

All I needed to do was to go into offline mode:

cf.set_config_file(offline=True)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM