Tuesday, October 20, 2020

Snippets in Google Colab

 A snippet is a reusable piece of code in Colab, which you can use whenever you want. The following instructs how to create a snippet in Colab.

  1. create the name of a snippet with heading in a text cell. note: the name must be given a heading sign #, or ## etc., which assigns an address to the name
  2. create the codes you want to reuse in the immediate next code cell
  3. Go to Tools and open Settings:


  4. Just paste the link of a notebook containing snippets, click SAVE, and you are ready to go:

  5. You can see all your snippets here. Just search for your snippet by its snippet name and insert it into your code


No comments:

Post a Comment

How to extract or save back data from or to google spreadsheet

 This post discusses how to extract or save back data from or to google spreadsheet with pandas in Colab     1  import authorization libriar...