Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I hide cell contents in Google Colaboratory?

I'm working through a tutorial in Google Colaboratory, and the author has handily hidden some of the solutions cells. When you click the hidden cell, it expands and becomes visible. How can I hide the cells?

An example is in this tutorial: Creating and Manipulating Tensors.

Hidden Cells example

like image 663
the_cat_lady Avatar asked Mar 03 '18 23:03

the_cat_lady


People also ask

How do I hide text in Google Colab?

Right click on the cell and select the 'Hide form' menu.

How do you hide cells in Jupyterlab?

Hide cell inputs If you add the tag hide-input to a cell, then Jupyter Book will hide the cell but display the outputs.

How do you select multiple cells in Colab?

With multiple cells selected: Press Shift + M to merge your selection. To split the active cell at the cursor, press Ctrl + Shift + - in edit mode. You can also click and Shift + Click in the margin to the left of your cells to select them.

How do you comment a cell in Colab?

You can select the lines of code and press ( Ctrl + / ) to comment or uncomment your selected lines of code.


1 Answers

None of the other answers worked for me. You can collapse cells by adding this to the top of the cell "#@title" and then double clicking on the white space that appears to the right of it.

like image 69
jarvis Avatar answered Sep 20 '22 17:09

jarvis