PyCharm: the Python IDE for Professional Developers by JetBrains

Mihai Chelaru-Centea

Software by JetBrains

Resource last updated: Dec. 2, 2018


Overview

PyCharm is one of the best Python IDEs on the market today. If you're currently a student, you can get the full professional version of this and other JetBrains products for free with their Student License. If that option is available to you, you should definitely give PyCharm a try.

Features

Like other JetBrains IDEs, PyCharm features sophisticated integration with the most popular frameworks and version control software, as well as open-source plugins that add extra functionalities and can be installed from their plugin browser. It also features great quality-of-life extras like one-click refactoring, great search functionality across various different levels of a project, and great syntax highlighting, code formatting, and import optimization.

PyCharm also has built-in debugging functionality, allowing you to easily narrow down where in your code an error is occurring, and you can even look at the values of your variables and see how they change as you step through your code to see if it conforms to your expected behaviour, which in some other IDEs might require a lot of print statements to diagnose.

Scientific mode offers the ability to view data frames and arrays in a sort of variable explorer, which is great for data science practitioners who want to have a look at how their data looks in Python after loading it in from an outside source like a CSV file, and after various transformations and cleaning steps have been applied.

You also have the option of running individual lines of code in order to see the output at each stage. Plots typically pop up in a separate window for viewing, although for data science the inline plotting of Jupyter Notebook might be preferable depending on your preferences.

I personally use PyCharm when working on this website, as it also has great functionality when it comes to HTML and CSS code highlighting and formatting, and it also formats Django templates much better than some VSCode Python formatting extensions I have tried.

You can also configure the console to run from your project folder with the shell that you want, and have an IPython shell running side-by-side if you wish. This allows me to run all the necessary Django manage.py commands like runserver for running a live local test server, or makemigrations and migrate when I mess around with the models.

The VCS integration with GitHub allows me to commit and push changes using their nice graphical interface, where I can sign-off on commits and add custom commit messages without having to touch a command line, and push those same changes to my repos with one click. Having the shell open also lets me run git push heroku master whenever I need my updates to go live into production on Heroku.

Hotkeys

To use any editor effectively, you have to learn the keyboard shortcuts and make a point of using them often to develop the muscle memory that makes you an efficient coder. To that end, it's good to know what commands are available by looking at the PyCharm default keymap, and as always read the official documentation for a guide on how the developers intended the editor to be used.

The Bottom Line


Overall, if you're creating Python applications or doing non-data science work, and you have access to the free student license, then definitely download PyCharm and learn to use it. Even the free community edition is probably worth getting, although I can't say I have personal experience with it.

If your goal is to work on data science tasks like building models for Kaggle and such, or you want to display your work for others to see it, then something like Jupyter is probably a better choice, and I do prefer the variable explorer in Spyder sometimes because the display is clearer and I find I can use it more easily.