Category Archives for "PANDAS"

Pandas Crosstab

Let’s talk about how to do some bi-variate analysis using the Crosstab function from pandas. The Crosstab function is very flexible and allows us to compare two categories. As usual, we’ll work on this practically using a sample dataset. We’re going to analyze a BankChurn dataset to see when our customers left and the different categories […]

Pandas GroupBy Function

Grouping data is one of the most important skills that you would require as a data analyst. Luckily, Pandas has a great function called GroupBy which is extremely flexible and allows you to answer many questions with just one line of code. In this tutorial, we’re going to understand the GroupBy function and subsequently answer some […]

Python Data Science Interview Questions and Answers

Honestly, knowing Python and knowing how to answer interview questions with Python can be two separate skills. I have bombed interviews due to not explaining my thought process when approaching a problem. Often interviewers are not concerned that you arrive at a perfect answer in the limited time that you are given. They put more […]

Python Moving Average

Creating a moving average is a fundamental part of data analysis. You can easily create moving averages with Python data manipulation package. Pandas has a great function that will allow you to quickly produce a moving average based on the window you define. This window can be defined by the periods or the rows of […]

Pandas Quick Start Guide

What is Pandas? Pandas is a Python library that used to read, clean, visualize, and process a dataset. Pandas uses a high-performance data analysis functions to manipulate data a structures  which called data frame. You can compare this to a table in tools like Excel. Learn Python with Codecademy. Master the skill that your future […]

Pandas Merge and Append Tables

There are multiple ways to join, concatenated and merge data using Pandas. However, it all depends on your use case. For the examples below, we are going to use the example of a pickle shop merging their data with an ice cream shop to create a single data frame. Let’s take a look at the […]

Pandas Cut – Continuous to Categorical

Pandas cut function or pd.cut() function is a great way to transform continuous data into categorical data. The question is why would you want to do this. Here are a few reasons you might want to use the Pandas cut function. Practice your  Python skills with Interactive Datasets. Reason to Cut and Bin your Continous Data […]

Create Pivot Tables with Pandas

One of the key actions for any data analyst is to be able to pivot data tables. Luckily Pandas has an excellent function that will allow you to pivot. To create this spreadsheet style pivot table, you will need two dependencies with is Numpy and Pandas. However, in newer iterations, you don’t need Numpy. Let’s […]