Python for Machine Learning

Hi Mukesh,

I do have the same problem. Do you know how to get this assignment and solutions? it would be great if you could suggest me.


Dear Learner,

Please drop a mail to mentioning the course name

hello sir
i had installed anaconda navigator and jupyterlab while in your class regarding uberlist csv file.i am unable to execute outputs like you shown in the video.the star mark in the brackets is appearing

Dear Learner,

Please drop a mail to mentioning the course name

course name is machine learning with python by raghu raman its a free course available in your website

Dear Learner,

Please drop a mail to mentioning the course name along with the error screenshot and the code.

Certificate are available in python machine learning live class…we will any payment of certificate

Hello Learner,
We do not provide certificates for live sessions. There is no payment required for the certificate.

I want to join free courses with certificate … How can i apply ? Snt me the registration link mam … I want to register and I will get the certificate … Please reply me mam

Is there anyway to remove all whitespaces in python string.I want remove all the leading and ending whitespaces?

I have a csv file and when i try to import it using pandas,it throws this error :UnicodeDecodeError: “utf-8” codec can’t decode byte in position : invalid start byte.

Any idea how to solve this problem?

Hi Learner,

Thank you for reaching out to us.
You can browse through all our courses here:
Steps on how to complete a course and receive the certificate

  1. Watch all the videos in the course completely to unlock Quiz/ Assignments/Practice exercise
  2. Score passing marks in the quiz/quizzes and submit the assignment/exercise (it is there in a course)
  3. Claim your course certificate to get the certificate.

You can use strip() function to remove all whitespaces that are leading and ending in a python string.Here is an example:

sentence = ’ let’s go out ’


‘let’s go out’

This happens if your file is not encoded in utf-8 format and is encoded in any other format .First you need to find out about the encoding of the file using chardet.Here is how you can do it:

import chardet
import pandas as pd

with open(‘filename.csv’, ‘rb’) as f:
result = chardet.detect( # or readline if the file is large

pd.read_csv(‘filename.csv’, encoding=result[‘encoding’])

There is no do…while loop because there is no nice way to define one that fits in the statement: indented block pattern used by every other Python compound statement. As such proposals to add such syntax have never reached agreement.

Nor is there really any need to have such a construct, not when you can just do:

while True:


if not condition:


and have the exact same effect as a C do { … } while condition loop.

while statement has been rejected because it doesn’t fit in the general format of indented block statement: indented block used by every other Python compound statement.

In the course “Machine Learning with Python” video “assignment on pandas”,, the teacher uses some files like “automobile.csv” and “pandas lab exercise” and I can’t find them in the course learning materials. Can anyone help me please?

How I can submit assignment?
We have to upload the jupyter notebook or something else?

The simple solution to the above problem is this

from sklearn.model_selction import train_test_split

This should work.

Best Wishes

Maneesh Bajaj

The k-nearest neighbors (KNN) algorithm is a simple, easy-to-implement supervised machine learning algorithm that can be used to solve both classification and regression problems.

The KNN Algorithm

  1. Load the data

  2. Initialize K to your chosen number of neighbors

  3. For each example in the data

3.1 Calculate the distance between the query example and the current example from the data.

3.2 Add the distance and the index of the example to an ordered collection

  1. Sort the ordered collection of distances and indices from smallest to largest (in ascending order) by the distances

  2. Pick the first K entries from the sorted collection

  3. Get the labels of the selected K entries

  4. If regression, return the mean of the K labels

  5. If classification, return the mode of the K labels


Mam i watched all the videos but i cant able to give the assessements and its not getting unlock if i completed watching all the videos.