https://miro.medium.com/max/1400/0*81gL-QtWtR27aS-a

Photo by Godfrey Nyangechi on Unsplash

TL;DR

VS Code can be pretty great for data science, especially if you pick the best extensions; in this article, I share some of my favourite extensions and my configuration.

What is VS Code?

Visual Studio Code - Code Editing. Redefined

It’s an open-source IDE maintained by Microsoft, which also owns GitHub and OpenAI.

It’s currently the most popular IDE among programmers [1], being very extensible and personalisable, as well as handling all of the tools and file formats that we usually use.

The most used IDEs as seen in StackOverflow’s 2021 Developer Survey.

The most used IDEs as seen in StackOverflow’s 2021 Developer Survey.

Copilot

Example of using Copilot in VS Code to generate documentation and Python code. GIF obtained from Rahul Banerjee.

Example of using Copilot in VS Code to generate documentation and Python code. GIF obtained from Rahul Banerjee.

Description

GitHub Copilot is a recent IDE extension developed by GitHub that, using a model trained by OpenAI on code and text, can give incredibly useful autocompletion. This goes beyond the usual autocompletion, where we’d get only things like a list of the available attributes and methods of a given object, to suggest to us full lines of code, entire methods and even comments and documentation!

Image obtained from GitHub Copilot’s webpage.

Image obtained from GitHub Copilot’s webpage.

In order to use it, you need to sign up for the technical preview:

GitHub Copilot · Your AI pair programmer

Extensions

GitHub Copilot - Visual Studio Marketplace

Automatic reformatting and warnings

Example of how VS Code can automatically correct the formatting when saving a file. GIF obtained from Wesley Camargo.

Example of how VS Code can automatically correct the formatting when saving a file. GIF obtained from Wesley Camargo.