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 asmerge
,join
, andconcat
.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.