Skip to content

Python

How to Change Font Size in Matplotlib Plot Cover Image

How to Change Font Size in Matplotlib Plot

In this tutorial, you’ll learn how to change font sizes on a Matplotlib plot. You’ll learn everything you need to know to customize your Matplotlib plot to have exactly the font sizes you want. Data visualization is an incredible tool

Matplotlib Marker Size Scatterplots Cover Image

Set Marker Size in Matplotlib Scatterplots

In this tutorial, you’ll learn how to define and set the marker size in Matplotlib scatterplots. Being able to control the size of your Matplotlib scatterplots allows you to add extra information to your scatterplots. This allows you to communicate

Creating Pair Plots in Seaborn with sns pairplot Cover Image

Creating Pair Plots in Seaborn with sns pairplot

In this tutorial, you’ll learn how to create pair plots in Seaborn, using the sns.pairplot() function. These visualizations plot pairwise relationships in a dataset so that each variable in a dataset will be plotted against each other variable in the

Python Array vs List Difference Between Array and List in Python Cover Image

Difference Between Array and List in Python

In this post, you’ll learn the difference between arrays and lists in Python. Both these data structures let you store data in Python and share many similar properties. However, they also let you do quite different things and knowing when

Pandas Count Unique Values using nunique and value_counts Cover Image

Count Unique Values in Pandas

In this tutorial, you’ll learn how to use Pandas to count unique values. You’ll learn how to count unique values in a column, in multiple columns, and in an entire DataFrame. Being able to count unique values can have important

Differences Between Python Lists and Tuples Cover Image

Python: Differences Between Lists and Tuples

In this tutorial, you’ll learn the differences between Python lists and tuples. Lists and tuples are fundamental Python container data structures. On the surface, they seem very similar. However, there are a number of unique differences between them that makes

Median Absolute Deviation in Python Cover Image

How to Calculate the Median Absolute Deviation in Python

The median absolute deviation (MAD), is a robust statistic of variability that measures the spread of a dataset. In this tutorial, you’ll learn how to use Python to calculate the median absolute deviation. By the end of this tutorial, you’ll

How to Change Plot and Figure Size in Matplotlib Cover Image

How to Change Plot and Figure Size in Matplotlib

In this tutorial, you’ll learn how to change the plot and figure sizes in Matplotlib. Data visualization is a valuable tool to help you communicate your data. Being able to customize exactly how your plots are sized gives you the

Get and Check Type of a Python Object type() and isinstance() Cover Image

Get and Check Type of a Python Object: type() and isinstance()

In this tutorial, you’ll learn how to get and check the type of a Python object using the type() and isinstance() functions. Everything in Python is an object and knowing what the object’s type is allows you to make better-informed

How to Use Python to Write a Text File (txt) Cover Image

How to Use Python to Write a Text File (.txt)

In this tutorial, you’ll learn how to use Python to write (or save) to a text file. Python provides incredible opportunity to read and work with text files – being able to save the output to a text file is

How to Check if a Python List is Empty

How to Check if a Python List is Empty

In this tutorial, you’ll learn how to use Python to check if a list empty. Python lists are one of the most versatile and widely-used container objects. Because Python lists are iterable, you may often want to first check if

Python Create Directory if It Doesn't Exist Cover Image

Python: Create a Directory if it Doesn’t Exist

In this tutorial, you’ll learn how to use Python to create a directory if it doesn’t exist. Creating directories programmatically can save you a ton of time. However, not checking if the directory exists first can lead to significant problems,