PyCharm Pro Scientific Mode

NB! Scientific mode only available in Pro version of PyCharm.

Started wondering how do i execute Jupyter style of cell codes in PyCharm and found out you can make executable cells in PyCharm by enabling Scientific mode.

You can enable Scientific Mode from View –> Scientific Mode.

Cell model enables code execution by cell so you can run python code in order and small portions. As example importing .csv dataset and teaching dataset to machine learning mode in small portions.. Instead of every time you execute your whole code starting from scratch and waiting to import .csv file and teaching model again. Portion of code can be executed from small green arrow or CTRL+ENTER.

New executable cells can be created in .ipynb and .py files with “#%%” that adds automatic cell reference and “# In[1]:” that manually adds cell reference. Numbered cells just reference to previous cells with lower numbers. Green arrow executes codes in order inside Python console as show in image below.

Jupyter notebook support

If you want to get more features like cell debug mode or Jupyter shortcuts for executing and creating new cells, you can install Jupyter package for PyCharm and run Jupyter server or Docker container and start using .ipynb files.

Jupyter notebook mode enables automatically while using .ipynb file and has different console with visualizations enabled.

Some example code in project Github:


What is “# In[num]:”:
PyCharm scientific mode:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s