使用here的帮助,我正在编写python代码以生成Jupyter笔记本。我的代码如下:
var rez = [];
for (p in array_part) {
array_full.filter(function(f) { if (f.indexOf(array_part[p]) > -1) {rez.push(f)} } )
}
我正在使用...
code1 = """\
a=[1,2,3]
for x in a:
print(x)"""
cell1=nbf.v4.new_code_cell(code1)
code2="""\
myString <- 'Hello, World!'
print(myString)""" #note that it is in R
cell2=nbf.v4.new_code_cell(code2)
...
执行代码,以便无需运行最终笔记本即可查看输出。
现在问题是,我希望!jupyter nbconvert --execute --inplace test.ipynb
使用python运行,这是默认设置(我想),而cell1
使用R。有没有办法实现这一目标?谢谢...