Tutorial Playlist

Python Tutorial for Beginners


How to Install Python on Windows?

Lesson - 1

Python OOPs Concept: Here's What You Need to Know

Lesson - 2

Getting Started With Jupyter Network

Lesson - 3

PyCharm Tutorial: Getting Started with PyCharm

Lesson - 4

A Beginner’s Guide To Python Variables

Lesson - 5

Python Numbers: Integers, Floats, Complex Numbers

Lesson - 6

Learn A to Z About Python Functions

Lesson - 7

The Basics of Python Loops

Lesson - 8

Introduction to Python While Loop

Lesson - 9

Python For Loops Explained With Examples

Lesson - 10

Understanding Python If-Else Statement

Lesson - 11

Introduction to Python Strings

Lesson - 12

Everything You Need to Know About Python Slicing

Lesson - 13

All You Need To Know About Python List

Lesson - 14

Python Regular Expression (RegEX)

Lesson - 15

An Introduction to Python Threading

Lesson - 16

Objects and Classes in Python: Create, Modify and Delete

Lesson - 17

The Best Python Pandas Tutorial

Lesson - 18

A Beginner's Guide To Web Scraping With Python

Lesson - 19

A Handy Guide to Python Tuples

Lesson - 20

How to Easily Implement Python Sets and Dictionaries

Lesson - 21

Everything You Need to Know About Python Arrays

Lesson - 22

An Introduction to Matplotlib for Beginners

Lesson - 23

An Introduction to Scikit-Learn: Machine Learning in Python

Lesson - 24

Top 10 Python IDEs in 2020: Choosing The Best One

Lesson - 25

The Best NumPy Tutorial for Beginners

Lesson - 26

Python Django Tutorial: The Best Guide on Django Framework

Lesson - 27

Top 10 Reason Why You Should Learn Python

Lesson - 28

How To Become a Python Developer

Lesson - 29

Top 50 Python Interview Questions and Answers in 2020

Lesson - 30
PyCharm Tutorial: Getting Started with PyCharm

PyCharm, created by the Czech company JetBrains, is a popular Integrated Development Environment (IDE) used in programming, particularly for the Python programming language. It is written in Java and Python, and its initial release was in February of 2010. PyCharm works with Windows, macOS, and Linux versions.

It provides a graphical debugger, an integrated unit tester, coding assistance, support for web development with Django, and integration with Anaconda’s data science platform.

This PyCharm tutorial will help you learn how to create new projects, add files to projects, customize the UI, run and debug Python code, and explore a lot of other features.

You can download PyCharm from the JetBrains website.

Learn the essentials of object-oriented programming, web development with Django, and more with the Python Training Course. Enroll now!


Once you click on download, it will give you two options: Professional or Community. The professional edition of PyCharm requires a subscription, while the community edition is free.


For this PyCharm tutorial, we will use the community edition. This will start downloading the .exe file. After the download is complete, run the file to install PyCharm.



Click on Finish to complete the PyCharm Community edition setup. 


Now that the installation is complete, let us discuss the PyCharm UI in this PyCharm tutorial. In the PyCharm UI, your options include File, Edit, View, Navigate, Code, Tools, VCS, Window, and Help.


If you want to make changes to the environment and the interface, click on File and go to Settings.



Now, to write your Python script, go to File and select New Scratch File.


Next in this PyCharm tutorial, let's create a new project by going to File and selecting New Project. Choose a name for the project and select create. You will see a pop-up asking how you want to open the project. I’ll choose This Window.


It will take a while to create a virtual environment. Once it’s ready, start by naming your project, and then, right-click it, go to New and select Python file. Name the Python file you have created. In our example, we’ve named it PyCharm.



At the bottom of the PyCharm window, you will find the Python Console, Terminal, and TODO options.

Python Training Course

Learn Data Operations in PythonExplore Course
Python Training Course

Let us continue this PyCharm tutorial performing some basic mathematical operations by importing the math module. It uses a full function (abs) to return the total value of a number.


You can see the Add Configuration option has changed to the name of the Python file. Next, click the green run button to execute your code. The Add Configuration will be reset every time you create a new project. There is a Run tab that comes up once your code executes successfully to display the output.

In the Python console, you can run one line of code, which will generate output beneath it.


PyCharm has a Refractor option, which allows you to rename a variable throughout the code. To do this, select the variable name, right-click and choose Refractor, and then click Rename.


In the next section of this PyCharm tutorial, we will cover how to import the NumPy module in PyCharm. However, if we use the following lines of code to import NumPy, it will throw an error.


To install NumPy on PyCharm, click on File and go to the Settings. Under Settings, choose your Python project and select Python Interpreter. Then, search for the NumPy package and click Install Package.



Now, let's rerun the code, and you can see this time that it executed successfully.


You can close your project by going to the File menu and selecting the Close Project.

If you want to open any file in PyCharm, select Open from the File menu and browse to the correct one. It will ask, “How would you like to open the project?”.  Select the method that works for you. 

You can edit the configuration of a project by selecting the name of the file and clicking on Edit Configurations.


This allows you to edit the Environment variables, choose the type of Python interpreter you need, select the Working directory, and so on.


PyCharm offers multiple ways to run the code:

  1. Click on the Run tab on the menu bar.
  2. Select the green run button.
  3. Hit Shift+F10.
  4. Right-click and select Run.

You can select each line of code, and it will show a red-colored point, which refers to the breakpoint.


To debug a program, select the bug option present on the top right or click on Run from the menu bar and choose Debug. It will execute until the breakpoint, which can be continued until completion by pressing F8.


Below is a small script that can help you understand more about how PyCharm works. Once you run this program, it will prompt you for inputs in the console.

st = input(“Enter X and Y”)

X, Y=[int(x) for x in st.split(‘,’)]


If you try to give anything other than integer as inputs, it will throw an error.


Let’s create a list and see how it works:

st = input(“Enter X and Y”)

X, Y=[int(x) for x in st.split(‘,’)]

lst = [[0 for col in range(Y)] for row in range(X)]



It results in a nested list with four zeros in each list.

Let's look at another example to see how you can loop through a list:

st = input(“Enter X and Y”)

X, Y=[int(x) for x in st.split(‘,’)]

lst = [[0 for col in range(Y)] for row in range(X)]

for row in range(X):
      for col in range(Y):

      lst[row][col] = row*col

for row in range(X):

loop through

The following code will print the elements in a list horizontally:

st = input(“Enter X and Y”)

X, Y=[int(x) for x in st.split(‘,’)]

lst = [[0 for col in range(Y)] for row in range(X)]

for row in range(X):
    for col in range(Y):

        lst[row][col] = row*col

for row in range(X):
   for col in range(Y):


The code below allows users to print each row with one underneath the other.

st = input(“Enter X and Y”)

X, Y=[int(x) for x in st.split(‘,’)]

lst = [[0 for col in range(Y)] for row in range(X)]

for row in range(X):
    for col in range(Y):

        lst[row][col] = row*col

for row in range(X):


Python has wonderful data visualization libraries, such as Matplotlib, that help you build interactive graphs and charts. Go to Settings and in Python Interpreter, search for Matplotlib, and click on Install Package.

Here is a simple straight-line graph plotted using Matplotlib:

import matplotlib.pyplot as plt




In the last section of this PyCharm tutorial, we will learn how to import a .csv file onto PyCharm using Pandas.

Learn data operations in Python, strings, conditional statements, error handling, and the commonly used Python web framework Django with the Python Training course.

Pandas is a widely popular library used for data analysis and manipulation in Python. You need to import the pandas package to use it. To do so, go to File menu >> Settings >> Python Interpreter >> Search for pandas >> install package.

The program below will help you import a CSV file onto PyCharm and store it as a data frame using the pandas library.

import pandas as pd

path = “D:/cars.csv”

df = pd.read_csv(path)



If you want to see the first five records of the data frame, use the head() function.



We hope this PyCharm tutorial helped you understand how to work with the Python language using the PyCharm IDE. You would've learned how to download and set up the PyCharm IDE, create a project and Python file, configure the settings, write simple code in Python, and run it in various ways. You got an idea of how to install packages, such as NumPy, Matplotlib, and pandas. Finally, you imported a .csv file onto PyCharm using pandas. That’s just some basics. If you want to learn more complex Python coding, enroll in our Python Training Course today!

About the Author

Avijeet BiswalAvijeet Biswal

Avijeet is a Senior Research Analyst at Simplilearn. Passionate about Data Analytics, Machine Learning, and Deep Learning, Avijeet is also interested in politics, cricket, and football.

View More
  • Disclaimer
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, and OPM3 are registered marks of the Project Management Institute, Inc.