0
我试过在jupyter笔记本中创建和使用类。 但似乎它不工作 我已经试过这样:如何在Jupyter笔记本中创建python类
def pxlocal(line, cell):
ip = get_ipython()
ip.run_cell_magic("px", line, cell)
ip.run_cell(cell)
ip.register_magic_function(pxlocal, "cell")
而且在不同的细胞:
%%pxlocal class MyClass(object):
但是当我运行这两个细胞中,这给了我这个错误:
ERROR:root:Cell magic `%%px` not found.
In [11]:
我在做什么错?
'pxlocal'假设你在做什么,你为什么需要它在笔记本上写一个类? –