How to get autocomplete in jupyter notebook without using tab?
I would like to get an autocompletion feature in notebooks i.e. when I type something, a dropdown menu appears, with all the possible things I might type, without having to press the tab button. Is there such a thing?
but this requires the tab button to be pressed
![]()
7 Answers 7
There is an extension called Hinterland for jupyter, which automatically displays the drop down menu when typing. There are also some other useful extensions.
In order to install extensions, you can follow the guide on this github repo. To easily activate extensions, you may want to use the extensions configurator.
The auto-completion with Jupyter Notebook is so weak, even with hinterland extension. Thanks for the idea of deep-learning-based code auto-completion. I developed a Jupyter Notebook Extension based on TabNine which provides code auto-completion based on Deep Learning. Here’s the Github link of my work: jupyter-tabnine.
It’s available on pypi index now. Simply issue following commands, then enjoy it:)
![]()
1.5GB memory. The memory used can drop to
200MB if you end the task from task manager and TabNine will autoboot itself the next time you type in your jupyter notebook. More details at github.com/zxqfl/TabNine/issues/43.
I would suggest hinterland extension.
In other answers I couldn’t find the method for how to install it from pip, so this is how you install it.
Как легко оптимизировать Jupyter Notebook. Часть 1

Самое классное в технологиях— это множество людей, которые усердно трудятся для улучшения нашей жизни. Каждый день они кровью и потом создают инструменты, упрощающие нашу работу.
Вам, к примеру, может казаться, что одной установки и запуска Jupyter Notebook вполне достаточно. Если все заработало, то и отлично! Но вы вряд ли знаете, что существует множество способов по настройке этой оболочки. А установка программы или пакета — это всего лишь начало!
Почему бы не потратить пару минут на то, чтобы сделать свой Jupyter Notebook удобнее для работы: быстрее, круче, мощнее и даже интереснее?
Данное руководство рассчитано на новичков в Jupyter Notebook. Мы начнем с самых основ, а затем перейдем к интересным примерам.
Сначала — о главном
После установки запустить Jupyter Notebook можно из терминала по команде:
теперь все готово для работы!
Изменение темы блокнота
Обычно первое, что люди хотят изменить в блокнотах Jupyter Notebook, — это тема оформления. Люди сходят с ума по темной теме! Изменить тему можно в любое время, и делается это довольно просто.
Для начала перейдите в терминал и установите jupyterthemes:
Теперь можно установить мега-популярную темную тему:

Восстановить основную тему можно через
Вот здесь можно найти GitHub-репозиторий jupyterthemes.
Основные команды
- Список горячих клавиш доступен из палитры команд, которая открывается по нажатию Ctrl + Shift + P или Cmd + Shift + P . Появившееся диалоговое окно очень похоже на Spotlight Search в Mac и позволяет выполнять команды по названию. Это очень удобно, если вы не знаете нужного сочетания клавиш.

- Shift + Enter запускает текущую ячейку;
- Esc открывает командный режим. Переходить по блокноту можно с помощью клавиш со стрелками.
В командном режиме можно пользоваться следующими клавишами:
- A — добавляет новую ячейку над текущей;
- B — добавляет новую ячейку под текущей;
- M — изменяет текущую ячейку на Markdown;
- Y — возвращает к ячейке с кодом;
- D + D — удаляет текущую ячейку (двойное нажатие клавиши);
- Enter — переход из командного режима в режим редактирования.
- Shift + Tab — показывает документацию для объекта, который вы только что добавили в ячейку кода (продолжайте нажимать эти клавиши для переключения между режимами);
- Esc + F — помогает найти и заменить информацию в коде (кроме выходных значений);
- Esc + 0 — переключает вывод ячеек;
- Shift + J или Shift + Down — выделяет ячейку ниже текущей. Shift + K или Shift + Up выделяет ячейку выше текущей. После выделения (выбора) ячеек можно выполнять пакетное удаление/копирование/вырезание/вставку/запуск. Это очень удобно, если нужно перенести часть документа.
- Shift + M — объединяет несколько ячеек (простой клик по нужным ячейкам ничего вам не даст. Для объединения ячеек их следует выделять с зажатым Shift , а затем, не отпуская Shift , нажать M ).
- В Jupiter Notebook можно запускать bash-команды. Для этого добавьте в начало строки восклицательный знак. Например: !pip install numpy
- Вы можете подавить вывод функции в последней строке кода, добавив в конце этой строки точку с запятой.
Комментирование/ удаление комментариев в блоках кода
Возможно, в процессе работы вам захочется добавить новые строки кода или закомментировать старые. Это весьма полезно при отладке и улучшении производительности кода.
Для добавления комментариев в код выделите нужные строки и нажмите cmd + / .
LaTex
Если напечатать LaTex в Markdown-ячейке, то она отобразится в виде формулы.
LaTex заменяет это:

Вывод всех значений ячейки
Как правило, в ячейке отображается только последний вывод. Для всего остального нужно прописывать print() . В принципе, ничего сложного, но это не всегда удобно. Изменить ситуацию можно, добавив вверху блокнота следующее:
Несмотря на то, что по умолчанию выводится только последний результат:

… вы увидите их все!

Если захотите вернуться к обычному представлению, то выполните следующее:
Обратите внимание, что запускать команду для изменения настроек необходимо в отдельной ячейке. Тогда изменения вступят в силу при следующем выполнении ячейки.
Расширения
Jupyter Notebook — это веб-приложение с открытым кодом, поэтому для него написано множество расширений. Все поддерживаемые расширения можно найти в официальном списке iPython-расширений или популярной подборке расширений.
Установить Nbextensions из командной строки довольно просто.
С помощью pip:
или Anaconda:
Сразу после их установки вы увидите вкладку Nbextensions. Пользуйтесь на здоровье!

В самом Jupyter Notebook детально описано, как добавлять, включать и работать с расширениями. Кликните по Nbextensions вверху экрана, нажмите на нужное расширение, пролистайте информацию о нем и посмотрите GIF-файл с его возможностями.
Jupyter Notebook Autocomplete, Intellisense and Menu Shortcuts For Machine Learning
Are you a data analyst or machine learning engineer looking for increasing your productivity? Do you work with Jupyter notebook frequently?
If you prefer to watch a video on this topic with a detailed explanation please check the below video tutorial:
In this article, we are going to discuss, why and how the autocomplete, Intellisesne, and menu shortcuts feature of Jupyter Notebook Machine Learning can increase your productivity.
The Jupyter Notebook is an open-source web application that allows us to create and share documents containing code, text, visualizations, and images.

The Jupyter notebook is based on two components. The first component is a web application and the second component is documents. The web application is a browser-based tool for the interactive creation of documents,
This involves code, text, images, computations, and the corresponding media output.
The notebook’s documents part is a representation of all content, visible in the web application. This includes inputs and outputs of the computations, code, text, images, and other media objects.
There are three main advantages of using IntelliSense:
• Time-saving, for example, we will not have to type long variables.
• Reduced bugs, as it helps in avoiding mistyped code.
• Learn quickly the relevant part of the programming language as we can use, the methods and attributes without looking at the documentation.
Autocomplete and IntelliSense:
The auto-complete and Intellisese feature of Jupyter notebook mean the notebook will show you the possible code you may want to write, based on the Python language syntax in this case.
Autocompletion is a form of intelligent code completion. This is a way to access names and signatures of functions, of a programming language like python. In other words, IntelliSense suggests what properties or functions the user may need to type, based on what the user has already typed.

For example, let us discuss an example of intellisence while working with sklearn library. Let us import the library in jupyter notebook. Then we need to
Type sklearn, then type dot and press TAB
And you will be able to see all the properties of sklearn which you may intend to use. Note that You do not need to install anything, to use the Jupyter notebook autocompletion feature.
Let us quickly see another example. Suppose this time we want to understand the signature of a function. For this, we need to type the function name
The opening bracket of function and type shift + TAB

In the above image, we are able to see the signature of the train test split function of sklearn library.
Menu Shortcuts:
The Jupyter Notebook has two different keyboard input modes.
- Edit mode: This mode allows you to type code or text into a cell and is indicated by a green cell border.

- Command mode: This mode binds the keyboard to notebook level commands and is indicated by a grey cell border with a blue left margin.

End Notes:
In this article, we explored the Jupyter Notebook Autocomplete Intellisense and menu Shortcuts.