Photo by Efe Kurnaz on Unsplash

There are certain functions in Python that perform unique functions, which many Python programmers may not know about. They may not be absolutely crucial to know, but they can perform some useful functions.

In this article, we will briefly discuss two such functions: tabulate, and tqdm.

create tables with tabulate

The tabulate function, which…

Photo by Pakata Goh on Unsplash

or operator

Let’s say a job posting only requires one of the following to be true: at least 10 years of SQL experience, or 12 years of machine learning experience, or 8 years of statistical analysis experience.

We can write a function that checks if any of those are True by using…

Photo by David Schultz on Unsplash

Every Python developer knows about dictionary objects in Python. However, there is another dictionary-like object, called a defaultdict object, which offers additional functionality when compared to regular dictionary objects.

Let’s introduce this defaultdict object via an example.

counting example

Let’s say that we want to count the number of occurrences of each…

Photo by Joshua Reddekopp on Unsplash

Even though Python is an object-oriented language, it still offers functions that provide a functional programming style. In a previous article, we discussed one of those functions, map. In this article, we will discuss another one of these Python built-in functions, the filter function.

In this tutorial, we will learn…

Photo by Fotis Fotopoulos on Unsplash

In a previous tutorial, we discussed how to create nicely-formatted tables in Python using the tabulate function. However, we can also use the pandas DataFrame function to create a DataFrame object to display tabular (two-dimensional) data.

There is no question that a pandas DataFrame object is best when any type…

Luay Matalka

Machine Learning Engineer with a passion for teaching.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store