plotly-dash 在 VS 代码中的 ipynb 文件上工作吗
Does plotly-dash work on ipynb files in VS code
我是 dash 新手,想知道是否有办法 运行 在 vs-code 中对 .ipynb 文件进行 dash。我发现使用 JupyterDash
可以 运行 在 Jupyter IDE(网络版)上运行。我想知道是否有办法将其扩展到 vs-code 中的 .ipynb 文件(我大量使用 vs-code Jupyter 而不是网络版本)。
我尝试在 vs-code 的 .ipynb 文件的单元格中使用此代码制作一个单选按钮,但它没有用(当然,相同的代码在 Jupyter 网络版本中确实有效)。如果在 vscode 中有 运行 的方法,请告诉我。
from jupyter_plotly_dash import JupyterDash
import dash
import dash_core_components as dcc
import dash_html_components as HTML
from dash.dependencies import Input,Output
app = JupyterDash('SimpleExample')
app.layout = html.Div([
dcc.RadioItems(
id = 'dropdown-color',
options = [{'label' : c, 'value' : c.lower()} for c in ['Red','Green','Blue']],
value = 'red'
)
])
app
关注最新的 jupyter dash 文档。试试这个:
from jupyter_dash import JupyterDash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
app = JupyterDash('SimpleExample')
app.layout = html.Div([
dcc.RadioItems(
id = 'dropdown-color',
options = [{'label' : c, 'value' : c.lower()} for c in ['Red','Green','Blue']],
value = 'red'
)
])
# Run app and display result inline in the notebook
app.run_server(mode='inline')
更多信息请点击此处:
https://medium.com/plotly/introducing-jupyterdash-811f1f57c02e
我是 dash 新手,想知道是否有办法 运行 在 vs-code 中对 .ipynb 文件进行 dash。我发现使用 JupyterDash
可以 运行 在 Jupyter IDE(网络版)上运行。我想知道是否有办法将其扩展到 vs-code 中的 .ipynb 文件(我大量使用 vs-code Jupyter 而不是网络版本)。
我尝试在 vs-code 的 .ipynb 文件的单元格中使用此代码制作一个单选按钮,但它没有用(当然,相同的代码在 Jupyter 网络版本中确实有效)。如果在 vscode 中有 运行 的方法,请告诉我。
from jupyter_plotly_dash import JupyterDash
import dash
import dash_core_components as dcc
import dash_html_components as HTML
from dash.dependencies import Input,Output
app = JupyterDash('SimpleExample')
app.layout = html.Div([
dcc.RadioItems(
id = 'dropdown-color',
options = [{'label' : c, 'value' : c.lower()} for c in ['Red','Green','Blue']],
value = 'red'
)
])
app
关注最新的 jupyter dash 文档。试试这个:
from jupyter_dash import JupyterDash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
app = JupyterDash('SimpleExample')
app.layout = html.Div([
dcc.RadioItems(
id = 'dropdown-color',
options = [{'label' : c, 'value' : c.lower()} for c in ['Red','Green','Blue']],
value = 'red'
)
])
# Run app and display result inline in the notebook
app.run_server(mode='inline')
更多信息请点击此处:
https://medium.com/plotly/introducing-jupyterdash-811f1f57c02e