Trying to use pandas library for data analysis?

Spending too much time on stack overflow or googling `how do I do x in pandas`?

Frustrated by the massive official documentation? The current version has over 2,500 pages!

You are not the only one!

I was frustrated too! I started to use pandas few years ago. Once I coded few larger projects I found myself visiting the code over and over again grabbing snippets of pandas to use in new projects: open csv in pandas, but skip rows 3 and 4? Save dataframe as csv, but without quotes? Rename columns of a dataframe?

It's time to put all the pandas snippets and cheats together!

Hi, I am Andreea Gheorghe, a software developer with extensive experience in working with data. I am currently trying to compile a collection of pandas code snippets that are commonly used in data exploration and analysis.

Code snippets are reusable, task-oriented blocks of code. It can be as simple as one line of code for a method call with specific arguments to multiple lines implementing a small app feature.

Sign up to the email list to receive updates on the collection progress.

Why is this Pandas Snippets and Cheats Collection awesome?

Multiple Digital Formats

Browse or Search it online. Read it on-the-go as pdf or epub.

Ready to use

The creation and management of code snippets can be an involved process. Thankfully, this collection provides out-of-the-box snippets for common data manipulation tasks with pandas.

Made for humans

Each code snippet has descriptive title easy to read and search. TOC pages for all the snippets categories.

Productivity boost

When coding, making use of existing code snippets is a great time-saving practice.


Python snippets related to data structures, lambda, map, filter and reduce functions

Oh, and one more thing

Don't copy-paste it. Type it out. It will help remembering it. This is the best way to learn.