Machine Learning

Python for Machine Learning

4.41 (3519 Ratings)


Skill level


Course cost

About this course

Python is an easy to learn, powerful programming language. You can use Python when your data analysis tasks need to be integrated with web apps or if statistics code needs to be incorporated into a production database.

Being a full-fledged programming language, Python is a great tool to implement algorithms for production use. There are several Python packages for basic data analysis and machine learning. In this course, you will learn about two popular packages in Python: NumPy and Pandas. These are the essential foundational packages that are required for basic data manipulation.

Skills covered

  • check Python Basics
  • check NumPy
  • check Pandas

Course Syllabus

Python Basics

  • play Introduction to Python
  • play Basic Installation of Python
  • play Keyboard shortcuts and installing packages
  • play Introduction to NumPy and its functions
  • play How to select group of objects from a particular array
  • play Indexing a matrix
  • play Selection techniques
  • play Input output options and saving files
  • play Pandas and its functions
  • play NumPy vs Pandas package
  • play Functionalities using Pandas
  • play Pandas dataframes and indexing
  • play Indexing in depth
  • play Deal missing data and group-by options
  • play Merging similar to SQL logic
  • play Basic operations in Pandas

Course Certificate

Get Python for Machine Learning course completion certificate from Great learning which you can share in the Certifications section of your LinkedIn profile, on printed resumes, CVs, or other documents.

GL Academy Sample Certificate

Discussion on Python for Machine Learning



I have completed watching all the video lectures but I have no idea on how to submit assignments, can anyone help!? My email id is -

Reply Icon Reply

I have completed the exercise but progress is not showing there. What can I do?

Reply Icon Reply


How do i get “assignment on pandas” which was given in class

Reply Icon Reply


Yes very nice and informative

Reply Icon Reply

i want data file pdf

Reply Icon Reply

I am not able to run this script.It shows this error “ImportError: numpy.core.multiarray failed to import” about numpy and i have already numpy installed.Here is my script:

import cv2
import time

cv.NamedWindow(“camera”, 1)

capture = cv.CaptureFromCAM(0)

while True:
img = cv.QueryFrame(capture)
cv.ShowImage(“camera”, img)
if cv.WaitKey(10) == 27:

Reply Icon Reply

When running this code in TensorFlow,I got this error: module ‘tensorflow’ has no attribute ‘session’ .But it worked fine last time i ran it.

import tensorflow as tf

msg = tf.constant(‘Hello, TensorFlow!’)

sess = tf.Session()


Reply Icon Reply

I was following a tutorial about machine learning and following code works fine in tutorial but shows error when i try exact same thing:

from sklearn.cross_validation import train_test_split

It returns me this error:

ImportError: No module named sklearn.cross_validation

Reply Icon Reply

How to create empty pandas dataframe?

Reply Icon Reply

I installed keras module in my system. But when I tried to import this module I got this below error : modulenotfounderror: no module named ‘keras’

Reply Icon Reply

how to convert a pandas dataframe into a NumPy array.

Reply Icon Reply

How to delete a column in a DataFrame?

Reply Icon Reply

I have just started with Python for Mah=chine Learning and completed a couple of videos but one of the video’s progress is stuck at 59%. How could I overcome this? If it will be like this then I will not be able to complete the course and will not get any certificate.

Reply Icon Reply

Hello All,

I who do l contact for the certification .
I haven’t received mine yet


Reply Icon Reply

i want excel data file

Reply Icon Reply

i want Machine Learning with Python all txt file

Reply Icon Reply

How can I reverse a list in python without reverse function?

Reply Icon Reply

Is both python for machine learning in english and hindi are same, as i see that some videos from English course are not available in hindi course

Reply Icon Reply

Sir i am benerplz help me

Reply Icon Reply

What is the difference between Python’s list methods append and extend?

Reply Icon Reply

Why is there no do while loop in python?

Reply Icon Reply

What is the difference between list and tuple?

Reply Icon Reply

This error may come if you do not have an opencv installed module in your system.

check the module is available or not.

$ pip list or conda list

If it is not available, then install Opencv

$ pip install opencv-python or conda install opencv-python

But before that, Install numpy module

$ pip install numpy

Reply Icon Reply

Can you help me with this error: ModuleNotFoundError: No module named ‘cv2’ ?

Reply Icon Reply

how to find files and skip directories in os.listdir?

Reply Icon Reply

How to install tensorflow in anaconda?

Reply Icon Reply

What do you mean by python scripting? What is a script and a module in python?

Reply Icon Reply

How to use not equal operator in python?

Reply Icon Reply

Can anybody help me with knn?

Reply Icon Reply

I just completed all the course material for Python for Machine Learning but then im not being able to access my qizz, which also donot allow to claim my certificate. Can somebody please help me.!xx

Reply Icon Reply

How can I read a pkl file for visualising it using pandas?

Reply Icon Reply

Pickle files (.pkl) are used to store the serialized form of Python objects. This means objects like list, set, tuple, dict, etc. are converted to a character stream before being stored on the disk. This allows you to continue working with the objects later on. These are particularly useful when you have trained your machine learning model and want to save them to make predictions later on.

So, if you serialized the files before saving them, you need to de-serialize them before you use them in your Python programs. This is done using the pickle.load() function in the pickle module. But when you open the pickle file with Python’s open() function, you need to provide the ‘rb’ parameter to read the binary file.

import pickle

with open('./Importing files/sample_pickle.pkl','rb') as file:
    data = pickle.load(file)

# pickle data

df_pkl = pd.DataFrame(data)

Reply Icon Reply

What is the latest Python version?

Reply Icon Reply

As of now, the latest version of python currently running is 3.8.3. From now on if you want to the know the latest version of Python, go to and you’ll see the most latest version available for download.

Reply Icon Reply

What does n do in Python?

Reply Icon Reply

In Python strings, the backslash “” is a special character, also called the “escape” character. It is used in representing certain white space characters and “\n” is one of them. It is used to start a new line.

Reply Icon Reply

What is the best compiler for Python?

Reply Icon Reply

Compilers are programs that convert source code written in a high-level programming language to a lower-level programming language.

Here are the top 5 best compilers for Python:

• CPython: This compiler-cum-interpreter is the de-facto Python compiler as it belongs to the reference implementation of Python i.e. CPython

• Brython: Supports – Python 3 to 3.7

• Nuitka: Supports – Python 2.6, 2.7, 3.3 to 3.7

• PyJS: Supports – Up to Python 2.7

• Skulpt: Supports – Up to Python 3.3

Reply Icon Reply

What are strings in Python?

Reply Icon Reply

Strings are sequence of characters enclosed within single quotes(‘ ’), double quotes(“ “) or triple quotes(‘’’ ‘’’) a = ‘Hello World’
b = “This is Sparta”
c = ‘’‘I am
to France

Code Explanation:
Here we start off by creating a string variable called ‘my_string’ and assign the value “My name is John” to it. In a string, each individual character is at a particular index and the index value starts at 0.
So, if we have to extract the first character in the string ‘M’, then, we ‘d have to give this command:
Since, indexing starts at 0, the index value of the first character ‘M’ will be 0.
We would have to give this command:
my_string[-1] to extract the last character from this string.

Reply Icon Reply

What are the basic math operators in Python?

Reply Icon Reply

** and == In python you use == to indicate if it is equal to something but if you use = then it will create a variable and if you use ** a power of b
Thank you , @toby

Reply Icon Reply

How do I create variables in python?

Reply Icon Reply

Programming languages deal with data. So, the question which arises over here is how do we actually store this data if we want to reuse it? Let’s you’re working with some data about employees of your organization and you’d have to store the names of employees, so how will you do that?

Well this is where variables come in. Variables are temporary storage spaces to store values.
Let’s say we create a variable called “employee_name”. Then we can go ahead and store the value “John” inside the variable. After some time, i can replace the value with “Sam”. Again after some time i’ll replace it with “Matt”.

Let’s see how can we create variables in python:
var1 = “Sam”
var1 = “Matt”
var1 = “John”
Since, variable is a temporary storage space, we can change the values which are stored in the variable “var1”.

Reply Icon Reply

Why is learning programming important?

Reply Icon Reply

As someone from a non-technical background, the word ‘Programming’ would itself be enough to send shivers down your spine! So, you must be thinking ‘Why should I even put in effort to learn Programming’?

Well programmers are in high demand all over the world and the median salary of a computer programmer is 100,000k$ per annum. And with the advent of artificial intelligence and the threat of many jobs becoming automated, you don’t have to be scared at all, because it will be you who will help in automating tasks as a computer programmer! Also there are still many systems for the next several decades that still require human intelligence, coupled with the ability to write code that makes this a very secure job option.

Now, that we know the importance of programming, let’s understand what exactly it is!
To answer that, let me ask a question! How do humans communicate with each other? We humans use a common language to speak with each other, isn’t it?

Similarly, if we have to speak with a computer, we need to learn a language which the computer can understand! And this is where a programming language comes in.
So, simply put, we solve real world problems, by speaking with the computer in a language it actually understands.

Let’s take the example of a calculator!
When, you feed in ‘1234 * 4321’ in the calculator. It immediately shows you, the result is ‘5,332,114’. How was the calculator able to do this multiplication?
This was possible because you wrote in a simple program to multiply two numbers which the calculator can understand.

Now, let’s look at some salary statistics for people who are skilled in programming!
According to LinkedIn, the average salary of a computer programmer in the United States is 100,000$ per annum and Rs.8,00,000 per annum in India. Well, this should be a good enough motivation for you to start learning programming!

Reply Icon Reply

How can you apply inheritance in Python?

Reply Icon Reply

class MyEmployee:
def init(self,_fname,_lname):
def Display(self):
return self.Fname,self.Lname,self.Email

class Enginners(MyEmployee):

Reply Icon Reply
popup asset

Welcome to Great Learning Academy