Some helpful shortcuts & tips in Jupyter Lab/Jupyter Notebook (which is an interactive file type you can run inside of Jupyter Lab which is a sort of environment where you can run other types of code, have terminals, do really cool stuff you can’t do in the classic Jupyter Notebook).

  • shift-tab will give you lots of info in a pop-up window
    • for objects, it will provide data type, length, etc.
    • for functions it will pull up doc-string
  • you can have that contextual info always available on the side by pressing command+I
  • %who will list all your variable names
  • %whos will list them and tell you about them (datatype, etc.)
  • you can also add a data type to search for after who if you just want to look for strings or something (e.g. %who str)
  • tab will auto-fill (or show you auto-fill options)
  • X will delete a cell
  • B will insert a cell below 
  • you can see all of them in the toolbar
  • File →  new console for notebook will let you run a console interacting with your notebook
  • Under the Help tab there are manuals for numpy, pandas, etc.
  • if you use ipykernels you can switch between different conda environments, choosing different kernels

There’s always Google! And YouTube – by experts, not me!

Here are some really great videos:

Here’s the documentation for Jupyter Lab: https://jupyterlab.readthedocs.io/en/stable/ 

You can install it from Anaconda: https://anaconda.org/conda-forge/jupyterlab 

Here’s a nice guide to getting Jupyter Lab set up with different conda environments by Justin Güse: https://towardsdatascience.com/how-to-set-up-anaconda-and-jupyter-notebook-the-right-way-de3b7623ea4a 

here’s some more about why it’s helpful to learn some programming even as a wet lab scientist, and some key tools to learn: blog: https://bit.ly/why_program  ; YouTube: https://youtu.be/hoi7g5tqj44    

Leave a Reply

Your email address will not be published. Required fields are marked *