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

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

问题描述

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

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?

推荐答案

目前,这是不可能的,但是有一个很大的讨论关于此主题,请访问 https://github.com/ipython/ipython/pull/2592 PR目前已关闭,但相应的问题已经打开 https:// github。 com / ipython / ipython / issues / 2958 并标记为愿望清单。

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.

In同时出现了一个IPython扩展,允许在markdown单元格中呈现python变量。此扩展程序是 IPython笔记本扩展程序的一部分,可与IPython 2.x和3.x的有关详细说明,请参阅维基页面

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天全站免登陆