TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Member-only story

Try These 3 Lesser-Known Pandas Functions

Yong Cui
6 min readAug 28, 2023

--

Photo by Balázs Kétyi on Unsplash

If you ask any experienced data scientist and machine learning engineer, what costs the most amount of time in their job? I guess many of them will say: data preprocessing — a step that cleans up the data and prepares it for sequential data analysis. The reason is simple — garbage in, garbage out. That is if you don’t prepare the data correctly, your “insights” of the data can hardly be meaningful.

Although the data preprocessing step can be rather tedious, Pandas provides all essential functions that allow us to complete our data clean-up job relatively easily. However, because of its versatility, not every user knows all the functionalities that the pandas library has to offer. In this article, I’d like to share 3 lesser-known, yet super useful, functions that you can try in your data science projects.

Without further ado, let’s dive in.

Note: To provide context, suppose that you’re responsible for data management and analysis of a clothing store. The examples shown below are based on this assumption.

1. explode

The first function that I want to mention is explode. This function is useful when you deal with data in a column that contains lists. When you use…

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Yong Cui
Yong Cui

Written by Yong Cui

Work at the nexus of biomedicine, data science & mobile dev. Author of Python How-to by Manning (https://www.manning.com/books/python-how-to).

Responses (4)