The Basics of Tabular Data
Contents
The Basics of Tabular Data¶
Content Summary¶
The basics of tabular data consist of understanding:
the structure of a table and how it represents a real-world phenomenon,
the basic operations that can be performed on a table and how they reflect the real-world phenomenon it represents,
the computational foundations for tabular data structures in Pandas.
Datasets¶
The primary dataset in this chapter consists of player statistics from the US Women’s National Team in Soccer between 1991 and 2019. The data is taken from Football Reference.
Summary of Library References¶
In the lists below, assume that the usual imports have been executed:
import pandas as pd
import numpy as np
Creating Tabular Structures:¶
Function or Method Name |
Description |
---|---|
Series constructor |
|
DataFrame constructor |
|
Reading CSV from file |
Series/DataFrame attributes and methods:¶
Function or Method Name |
Description |
---|---|
Number of rows/columns |
|
Returns first few lines |
|
Returns the last few lines |
|
Returns the number of unique values |
|
Returns the type of the column(s) |
|
Returns column(s) coerced to a given type |
|
sorts Series/DataFrame according to its values |
|
drops duplicates indices/columns |
|
apply a function to the entries of a Series / slices of a DataFrame |
|
apply a collection of functions to a Series/DataFrame |
Methods for computing descriptive statistics on Series/DataFrames:¶
Function or Method Name |
Description |
---|---|
Returns descriptive statistice of column(s) |
|
Returns the number of non-null entries |
|
Returns the sum |
|
Returns the median |
|
Returns the median |
|
Returns the sample standard deviation |
|
Returns the sample variance |