Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to split a code cell in Google Colab?

Using Jupyter Notebook I found that the function to split cells is very useful. I would like to do that in Google Colab as well, but I can't find how to do it.

Can it be done? And if the answer is yes, how?

like image 551
SilentCloud Avatar asked Mar 18 '21 13:03

SilentCloud


People also ask

How do I add a code to a cell in Google Colab?

Code cells Click the Play icon in the left gutter of the cell; Type Cmd/Ctrl+Enter to run the cell in place; Type Shift+Enter to run the cell and move focus to the next cell (adding one if none exists); or. Type Alt+Enter to run the cell and insert a new code cell immediately below it.

How do I make a cell markdown in Google Colab?

Colab has two types of cells: text and code. Text cells are formatted using a simple markup language called Markdown. To see the Markdown source, double-click a text cell, showing both the Markdown source and the rendered version. Above the Markdown source there is a toolbar to assist editing.


Video Answer


1 Answers

I don't know how to do it via menu selections, but in Jupyter Lab the shortcut is "Ctrl+Shift+-" to split a cell. Google Colab's shortcuts often replace "Ctrl+Shift+…" with "⌘/Ctrl+M …".

So, in this case, it would probably be "⌘/Ctrl+M -".

The "Keyboard shortcuts" window confirms this.

like image 158
Ankara Avatar answered Oct 01 '22 01:10

Ankara