Is there a way to selectively hide one specific input or output cell in IPython notebook?
I could only find the below code to show / hide all input cells.
h
The @Mathmagician solution is almost perfect, but has many side effects.
More correct would be like:
from IPython.core.display import display, HTML
toggle_code_str = '''
'''
toggle_code_prepare_str = '''
'''
display(HTML(toggle_code_prepare_str + toggle_code_str))
def toggle_code():
display(HTML(toggle_code_str))
The call toggle_code than may be placed in some code cell before other code, so if code in the cell is executed slowly, won't be side effects. Also it solves the problem with Run Cells and Select/Insert Below
It adds the toggle button, but the initial state can't be managed