Book Image

The Pandas Workshop

By : Blaine Bateman, Saikat Basak, Thomas V. Joseph, William So
5 (1)
Book Image

The Pandas Workshop

5 (1)
By: Blaine Bateman, Saikat Basak, Thomas V. Joseph, William So

Overview of this book

The Pandas Workshop will teach you how to be more productive with data and generate real business insights to inform your decision-making. You will be guided through real-world data science problems and shown how to apply key techniques in the context of realistic examples and exercises. Engaging activities will then challenge you to apply your new skills in a way that prepares you for real data science projects. You’ll see how experienced data scientists tackle a wide range of problems using data analysis with pandas. Unlike other Python books, which focus on theory and spend too long on dry, technical explanations, this workshop is designed to quickly get you to write clean code and build your understanding through hands-on practice. As you work through this Python pandas book, you’ll tackle various real-world scenarios, such as using an air quality dataset to understand the pattern of nitrogen dioxide emissions in a city, as well as analyzing transportation data to improve bus transportation services. By the end of this data analytics book, you’ll have the knowledge, skills, and confidence you need to solve your own challenging data science problems with pandas.
Table of Contents (21 chapters)
1
Part 1 – Introduction to pandas
6
Part 2 – Working with Data
11
Part 3 – Data Modeling
15
Part 4 – Additional Use Cases for pandas

Components and applications of pandas

An introduction to the pandas library would be incomplete without a glimpse into its architecture. The pandas library is comprised of the following components:

  • pandas/core: This contains the implementations of the basic data structures of pandas, such as Series and DataFrames. Series and DataFrames are basic toolsets that are very handy for data manipulation and are used extensively by data scientists. They will be covered in Chapter 2, Data Structures.
  • pandas/src: This consists of algorithms that provide the basic functionalities of pandas. These functionalities are part of the architecture of pandas, which you will not be using explicitly. This layer is written in C or Cython.
  • pandas/io: This comprises toolsets for the input and output of files and data. These toolsets facilitate data input from sources such as CSV and text and allow you to write data to formats such as text and CSV. They will be covered in detail in Chapter 3, Data I/O.
  • pandas/tools: This layer contains all the code and algorithms for pandas functions and methods, such as merge, join, and concat.
  • pandas/sparse: This contains the functionalities for handling missing values within its data structures, such as DataFrames and Series.
  • pandas/stats: This contains a set of tools for handling statistical functions such as regression and classification.
  • pandas/util: This contains all the utilities for debugging the library.
  • pandas/rpy: This is the interface for connecting to R.

The versatility of its different architectural components makes pandas useful in many real-world applications. Various data-wrangling functionalities in pandas (such as merge, join, and concatenation) save time when building real-world applications. Some notable applications where the pandas library can come in handy are as follows:

  • Recommendation systems
  • Advertising
  • Stock predictions
  • Neuroscience
  • Natural language processing (NLP)

The list goes on. What's more important to note is that these are applications that have an impact on people's daily lives. For this reason, learning pandas has the potential to give a fillip to your analytics career. Benjamin Franklin, one of the founding fathers of the United States, once said the following:

"An investment in knowledge pays the best interest."

Throughout this book, you are going to invest your time in a tool that can have a profound impact on your analytics career. Do make the best use of this opportunity.