hands-on lab

Performing K-Means Clustering With Python

Up to 1h
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.


K-Means learning is a machine learning technique used to divide a dataset into clusters to analyze its results. This classification algorithm divides a large group of data into smaller groups to maximize the similarity between data points. We will walk through applying and analyzing the K-Means clustering algorithm on a set of data using the Python libraries: pandas, scikit-learn, and matplotlib.

Learning Objectives

Upon completion of this lab you will be able to:

  • Utilize Python to prepare data for Cluster Machine Learning
  • Perform K-Means Clustering on a set of data
  • Plotting the outcome of the K-Means clustering

Intended Audience

This lab is intended for:

  • Data engineers
  • Machine learning practitioners
  • Anyone interested in using Python to perform clustering


You should possess:

  • A basic understanding of Python
  • A basic understanding of K-Means Clustering

About the author

Learning paths

Calculated Systems was founded by experts in Hadoop, Google Cloud and AWS. Calculated Systems enables code-free capture, mapping and transformation of data in the cloud based on Apache NiFi, an open source project originally developed within the NSA. Calculated Systems accelerates time to market for new innovations while maintaining data integrity.  With cloud automation tools, deep industry expertise, and experience productionalizing workloads development cycles are cut down to a fraction of their normal time. The ability to quickly develop large scale data ingestion and processing  decreases the risk companies face in long development cycles. Calculated Systems is one of the industry leaders in Big Data transformation and education of these complex technologies.

Covered topics

Lab steps

Signing In to the Google Cloud Console
Opening the Lab's Jupyter Notebook in Google Cloud