Contribute Media
A thank you to everyone who makes this possible: Read More

How do I make my pandas DataFrame smaller and faster?


Are you working with a large dataset in pandas, and wondering if you can reduce its memory footprint or improve its efficiency? In this video, I'll show you how to do exactly that in one line of code using the "category" data type, introduced in pandas 0.15. I'll explain how it works, and how to know when you shouldn't use it.

This is video 21 of 30 in the series, Easier data analysis in Python with pandas. The notebook and datasets shown in the video are available on GitHub.

Improve this page