Issue
Sometimes i don't need code and just want to see the report in iPython. Is it possible to view only "out" cells in iPython Notebook?
Solution
Yes. Install ipython-notebook-extensions. These extensions provide many features, including runtools
, which allows you to
Hide or show input (i.e. the source code) of marked code cells
Hide or show output of marked code cells
If you are using ipython3.x, you can install from an ipython notebook via the following:
import IPython.html.nbextensions as nb
ext= 'https://github.com/ipython-contrib/IPython-notebook-extensions/archive/3.x.zip'
nb.install_nbextension(ext)
Load runtools
extension
from IPython.html.services.config import ConfigManager
ip = get_ipython()
cm = ConfigManager(parent=ip, profile_dir=ip.profile_dir.location)
cm.update('notebook', {"load_extensions": {"IPython-notebook-extensions-3.x/usability/runtools/main": True}})
From a normal notebook, below,
you can mark a cell (or all cells) and
either view or hide input and output.
Answered By - AGS
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.