Pandas

Analyze data with the Pandas data analysis library for Python. Start from the basics or see real-life examples of pros using Pandas to solve problems.
Using Pandas and SQLAlchemy to Simplify Databases

Using Pandas and SQLAlchemy to Simplify Databases

Use SQLAlchemy with PyMySQL to make database connections easy.

Manually opening and closing cursors? Iterating through DB output by hand? Remembering which function is the actual one that matches the Python data structure you're gonna be using?

There has to be a better way!

There totally is.

One of Pandas' most useful abilities is easy I/O. Whether it's a CSV, JSON, an Excel file, or a database -

Pandas Matthew Alhonte avatarMatthew Alhonte Matthew Alhonte avatar
mattFeb 23
Jul 03
Read
Using Pandas with AWS Lambda Functions

Using Pandas with AWS Lambda Functions

Forcefully use the Pandas library in your AWS Lambda functions.

In one corner we have Pandas: Python's beloved data analysis library. In the other, AWS: the unstoppable cloud provider we're obligated to use for all eternity. We should have know this day would come.

While not the prettiest workflow, uploaded Python package dependencies for usage in AWS Lambda is typically straightforward. We install the packages locally to a virtual env,

Read
Dropping Rows of Data Using Pandas

Dropping Rows of Data Using Pandas

Square one of cleaning your Pandas Dataframes: dropping empty or problematic data.

You've heard the cliché before: it is often cited that roughly %80~ of a data scientist's role is dedicated to cleaning data sets. I Personally haven't looked in to the papers or clinical trials which prove this number (that was a joke), but the idea holds true: in the data profession, we find ourselves doing away with blatantly corrupt or

Pandas Todd Birchard avatarTodd Birchard Todd Birchard avatar
toddFeb 23
Apr 18
Read
Merge Sets of Data in Python Using Pandas

Merge Sets of Data in Python Using Pandas

Perform SQL-like merges of data using Python's Pandas.

Let's say you have two obscenely large sets of data.

These sets of data contain information on a similar topic, such as customers. Dataset #1 might contain a high-level view of all customers of a business, while Datatset #2 contains a lifetime history of orders for a company. Unsurprisingly, the customers in Dataset #1 appear in

Pandas Todd Birchard avatarTodd Birchard Todd Birchard avatar
toddFeb 23
Nov 17
Read
Another "Intro to Data Analysis in Python Using Pandas" Post

Another "Intro to Data Analysis in Python Using Pandas" Post

Obligatory Pandas tutorial by a questionably qualified stranger.

Let’s face it: the last thing the world needs is another “Intro to Pandas” post. Anybody strange enough to read this blog surely had the same reaction to discovering Pandas as I did: a manic euphoria that can only be described as love at first sight. We wanted to tell the world, and that we did. A lot. Yet

Pandas Todd Birchard avatarTodd Birchard Todd Birchard avatar
toddFeb 23
Oct 02
Read