我可以在 IPython 笔记本标记单元格上使用变量吗? [英] Can I use variables on an IPython notebook markup cell?

查看:22
本文介绍了我可以在 IPython 笔记本标记单元格上使用变量吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 IPython 笔记本,我想在标记单元格中使用我的一个变量.这甚至可能吗?如果是这样,你是怎么做的?

解决方案

目前,这是不可能的,但是这里有关于这个话题的大量讨论 https://github.com/ipython/ipython/pull/2592. PR目前已关闭,但已开启相应issuehttps://github.com/ipython/ipython/issues/2958 并标记为愿望清单.

更新

与此同时,出现了一个 IPython 扩展,它允许在 Markdown 单元格中呈现 python 变量.此扩展是 IPython 笔记本扩展 的一部分,适用于 IPython 2.x 和3.x.有关详细说明,请参阅 wiki 页面.>

I have an IPython notebook and I would like to use one of my variables inside a markup cell. Is this even possible? If so, how do you do it?

解决方案

Currently, this is not possible, however there is a large discussion on this topic here https://github.com/ipython/ipython/pull/2592. The PR is currently closed, but a corresponding issue is opened https://github.com/ipython/ipython/issues/2958 and marked as wishlist.

Update

In the meantime an IPython extension has appeared which allows to render python variables in markdown cells. This extension is part of the IPython notebook extensions and works with IPython 2.x and 3.x. For a detailed description see the wiki page.

这篇关于我可以在 IPython 笔记本标记单元格上使用变量吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆