Pierian Blog

Python Basics, Tutorials

Python NumPy Tutorial: Get Length of Array in Python

Introduction NumPy is a popular Python library used for numerical computing. It provides support for multi-dimensional arrays and matrices, along with a wide range of mathematical functions to operate on these arrays. In this tutorial, we will learn how to get the length of an array in Python using NumPy. What is NumPy? NumPy stands […]

Python Basics, Tutorials

How to Reverse a String in Python

Introduction Reversing a string is a common task in programming, and Python provides a simple way to achieve this. In this blog post, we will discuss the different methods you can use to reverse a string in Python. Using string slicing One of the simplest ways to reverse a string in Python is by using […]

Python Basics, Tutorials

Python Tutorial: Replace Character in a String

Introduction In Python, strings are a sequence of characters enclosed within quotes. They are immutable, which means that once a string is created, it cannot be modified. However, you can create a new string based on the existing one with the desired changes. One common operation that you may need to perform on a string […]

Machine Learning, Tutorials

Machine Learning with Python: K Means Clustering

Introduction K Means clustering is a popular machine learning algorithm used for grouping data points into distinct clusters based on their similarities. This powerful technique is widely used in various fields such as finance, marketing, biology and many more. K Means clustering is an unsupervised learning algorithm which means it doesn’t require the input data […]

Python Basics

Primitive Data Types in Python

Introduction As a programmer, understanding data types is essential to writing efficient and effective code. In Python, like in many programming languages, there are several primitive data types that form the building blocks of more complex data structures. These fundamental data types allow us to store and manipulate simple values such as numbers or characters […]

Data Science, Machine Learning, Tutorials

Machine Learning with Python: K Nearest Neighbors

Introduction K Nearest Neighbors (KNN) is a popular supervised machine learning algorithm that has been widely used in a variety of fields, including marketing, healthcare, and image recognition. It is a simple yet powerful algorithm that belongs to the category of instance-based learning or lazy learning. The KNN algorithm can be applied both for classification […]

Python Basics

How to Create an Empty List in Python

Introduction Are you interested in learning about one of the most fundamental aspects of programming with Python? If so, then this blog post is for you! Here we’ll be taking a closer look at how to create and work with an empty list. An empty list is a simple data structure that has numerous uses […]