英文:
How do I run single line of code in a cell on Databricks?
问题
在Databricks笔记本中,我想要在单元格中只运行一行代码。例如,这是我的单元格:
print("line 1")
print("line 2")
我想要执行的只是 print("line 1")
。我知道如何在Jupyter Notebook 中实现这一点,但不知道如何在Databricks笔记本中实现。
英文:
In Databricks notebook I would like to run only single line of code in a cell. For example here is my cell
print("line 1")
print("line 2")
and I would like to execute only print("line 1")
. I found how to do it in Jupyter Notebook, but not in Databricks notebook.
答案1
得分: 1
不是确切的答案,但可能对其他人有用;如此处所述,您可以通过选择该行然后按下Shift
+ Control
+ Enter
来运行单元格的一部分。
英文:
Not the exact answer but might be useful for others; as mentioned here you can run only part of the cell by selecting the line and pressing Shift
+ Control
+ Enter
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论