How to Enable IntelliSense or Autocomplete in Jupyter Notebook

No matter how good you are in programming with respect to a language like python you may not be able to remember all the functions names or syntax or function parameters. So you may require to use intellisense or autocomplete feature of Jupyter notebook while programming in pandas, python and similar libraries.

You may like to read how to use Amazon CodeWhisperer to Generate Code

What is intellisense or autocomplete?

IntelliSense or autocomplete is a feature commonly found in integrated development environments (IDEs) and text editors that provides context-aware suggestions as you type code. The goal of IntelliSense is to improve the productivity of developers by reducing the time and effort required to write code.

When you start typing a statement in an IDE with IntelliSense, the IDE will analyze the context of your code and present a list of suggestions based on what you have typed so far.
For example, if you start typing a variable name, IntelliSense may suggest the names of variables that are defined in the current scope, along with their data types. If you start typing a method name, IntelliSense may suggest methods that are available for the object that you are working with.

What are the advantages of intellisense or autocomplete?

IntelliSense can help you avoid syntax errors, by highlighting potential issues as you type and offering suggestions for correcting them. It can also help you discover new functions, methods, or classes that you may not have been familiar with, by presenting them as suggestions as you type.

Autocomplete is a similar feature that provides suggestions as you type, but focuses on completing the text that you have already started typing. Autocomplete will suggest the most likely text based on what you have typed so far, and you can then choose the suggestion that you want to complete your statement.

Yes it is possible to use IntelliSense and autocomplete in Jupyter Notebook.

Intellisense or Autocomplete in Jupyter Notebook
Intellisense or Autocomplete in Jupyter Notebook

As you can see in above image, you just need to press TAB key after typing the dot after np and you will get all the functions related to numpy.

Similarly if you want to see the parameters or signature of a function, type the function name and then the opening bracket of the function and then press Shift+Tab as shown below.

Intellisense or Autocomplete in Jupyter Notebook
Intellisense or Autocomplete in Jupyter Notebook

If somehow the intelliSense of your Jupyter notebook is not working, below information may be helpful

You may activate IntelliSense in Jupyter Notebook in two different ways:

  1. Using the package jupyter-contrib-nbextensions. This package offers a number of Jupyter Notebook extensions, including an autocomplete extension.
    You can enter the following command at a command prompt or terminal to install the package:
pip install jupyter_contrib_nbextensions

2. Using the jupyter-autocomplete package:
This package provides a simple autocomplete feature for Jupyter Notebook, and can be installed by running the following command in your terminal or command prompt:

pip install jupyter-autocomplete

If you want to learn more about Jupyter Notebook Click Here.

End Notes:

IntelliSense and autocomplete can significantly improve the speed and efficiency of writing code, by reducing the time and effort required to type and remember code, and by highlighting potential issues as you work.

I hope you enjoyed this article and can start using some of the techniques described here in your own projects soon.

You may like to read our other popular posts as below:

Learn about Time Complexity and Space Complexity of Code with Python Example

Linear Regression in Python in 10 Lines

Logistic Regression In Python in 10 Lines

Generating Synthetic Data for Logistic Regression

Scatter Plot using Seaborn and Sklearn

One thought on “How to Enable IntelliSense or Autocomplete in Jupyter Notebook

  1. What disadvantage you will found using auto competition and what changes you suggest to the jupyter notebook

Leave a Reply