Numpy, Pandas, and Matplotlib Notes

Read a textbook about numpy, pandas, and matplotlib to get a better understanding of the libraries. Here are the notes my that.

2 451

Python for Data Analysis, 3E, by Wes McKinney

Introduction

NumPy Basics: Arrays and Vectorized Computation

ndarray (N-Dimenional Array)

mask = (names =="Bob") | (names=="Will")

Getting Started with Pandas

Introduction

Essential Functionality

Statistics

Data Loading Storage and File Formats

Reading data and making it accessible, called data loading is neccessary first step for using most of the tools in this book. The term parsing is also sometime used to descibe loading text data and interpreting it as tables and different data types.

Data Cleaning and Preperation

During the course of doing daata analysis and modeling, a significant amount of time is spent on data preparation: loading, cleaning, transforming, and rearranging. Such tasks are often reported to take up to 80% or more of an analysts time.

Data Wrangling: Join, Combine, and Reshape

Plotting and Visualization

Data Aggregation and Group Operations

Hadley Wickham, an author of many popular packages for the R programming
language, coined the term split-apply-combine for describing group operations. In the
first stage of the process, data contained in a pandas object, whether a Series, Data‐
Frame, or otherwise, is split into groups based on one or more keys that you provide.
The splitting is performed on a particular axis of an object. For example, a DataFrame
can be grouped on its rows (axis="index") or its columns (axis="columns"). Once
this is done, a function is applied to each group, producing a new value. Finally,
the results of all those function applications are combined into a result object. The
form of the resulting object will usually depend on what’s being done to the data. See
Figure 10-1 for a mockup of a simple group aggregation.

Comments

You have to be logged in to add a comment

User Comments

Insert Math Markup

ESC
About Inserting Math Content
Display Style:

Embed News Content

ESC
About Embedding News Content

Embed Youtube Video

ESC
Embedding Youtube Videos

Embed TikTok Video

ESC
Embedding TikTok Videos

Embed X Post

ESC
Embedding X Posts

Embed Instagram Post

ESC
Embedding Instagram Posts

Insert Details Element

ESC

Example Output:

Summary Title
You will be able to insert content here after confirming the title of the <details> element.

Insert Table

ESC
Customization
Align:
Preview:

Insert Horizontal Rule

#000000

Preview:


View Content At Different Sizes

ESC

Edit Style of Block Nodes

ESC

Edit the background color, default text color, margin, padding, and border of block nodes. Editable block nodes include paragraphs, headers, and lists.

#ffffff
#000000

Edit Selected Cells

Change the background color, vertical align, and borders of the cells in the current selection.

#ffffff
Vertical Align:
Border
#000000
Border Style:

Edit Table

ESC
Customization:
Align:

Upload Lexical State

ESC

Upload a .lexical file. If the file type matches the type of the current editor, then a preview will be shown below the file input.

Upload 3D Object

ESC

Upload Jupyter Notebook

ESC

Upload a Jupyter notebook and embed the resulting HTML in the text editor.

Insert Custom HTML

ESC

Edit Image Background Color

ESC
#ffffff

Insert Columns Layout

ESC
Column Type:

Select Code Language

ESC
Select Coding Language

Insert Chart

ESC

Use the search box below

Upload Previous Version of Article State

ESC