How to Concatenate Data Frames in Pandas (Fast and Easy)

Using pandas merge() and .join() gives you a dataset with the rows of the initial datasets mixed. The rows are typically arranged based on common attributes.  But there’s a chance that the resultant dataset may not have all the rows from the parent datasets if those rows don’t have any matches between each other.  Pandas […]

Read More

How to Count Objects in Python 3 with a Python Counter

Python is considered one of the easiest programming languages to use, and for good reason. There are libraries and built-in functionalities that allow you to do nearly anything you want to do. Counting multiple repeated objects is a programming problem that developers have had to find complex solutions to for decades. But in Python, the […]

Read More

How To Use the Python Zip Function (Fast and Easy)

Python’s zip() function helps developers group data from several data structures. The elements are joined in the order they appear; with it, you can iterate simultaneously over different data structures. All without using a single nested loop! If this is what you’re trying to achieve, you will need to learn to use zip(). And the […]

Read More

How To Use Unittest to Write a Test Case for A Function in Python

The unittest module has been a part of the Python standard library since Python 2.1. As its name would suggest, it helps developers write and run tests for their code.  Unit testing involves checking code for bugs by testing the smallest testable pieces of code. These tiny chunks of code are termed “units.” Testing code […]

Read More

Top 10 Python Courses Online in 2022

Introduction Python has become one of the most widely used and easily accessible coding languages worldwide. It has been an empowering tool for many people across different fields in STEM and even other disciplines of study.  Acquiring such an essential skill is a coveted opportunity since it improves your chances of employability and, more importantly, […]

Read More

A Complete Guide on How to Test Python Applications with Pytest

Writing tests is a key part of Python development since tests enable programmers to check the validity of their code. They are considered one of the most effective ways to prove that the written code is functioning as necessary and reducing the chances of future changes breaking the functionality. And this is where Pytest comes […]

Read More

How To Use the Python Map Function (Step by Step)

Mapping is a method that allows developers to process and transforms the elements in an iterable without explicitly declaring a for loop. And this is where the map() function comes in. It allows developers to transform every item of an iterable into a new iterable.  The map() function is one of the two built-in Python […]

Read More

FastAPI Tutorial for Beginners: The Resources You Need

While Flask was created as an April fool’s joke in 2004, and Django was an internal project at Lawrence Journal-World newspaper around the same time, both these Python web frameworks gained massive prominence and popularity.  However, the Python of when these frameworks were built is different from the Python of today. Contemporary elements of the […]

Read More

Pandas Groupby Explained: A Guide on Using Pandas Groupby

Python is an excellent data analysis tool since it features a rich ecosystem of data-centric packages. Pandas is one of the more popular packages that simplifies importing and analyzing data. In this guide, we discuss how the .groupby() method works using split-apply-combine and also how to access groups and transform data.  What is the Pandas […]

Read More

The Zen of Python: A Philosophy of Programming Excellence

The Zen of Python is a collection of 19 observations noted by Tim Peters, one of the creators of Python. While the original collection had 20 aphorisms, Guido van Rossum dismisses the final one as a bizarre joke by Peters.  The collection was standardized in 2004 as PEP 20 since it significantly impacted the Python […]

Read More