Introduction
Course introduction
()
Course structure and outline
()
Introducing the course project
()
Setting expectations
()
Jupyter installation and launch
()
1. NumPy Primer
pandas and NumPy intro
()
NumPy arrays and array properties
()
Challenge: Array basics
()
Solution: Array basics
()
Array creation
()
Random number generation
()
Challenge: Array creation
()
Solution: Array creation
()
Indexing and slicing arrays
()
Challenge: Indexing and slicing arrays
()
Solution: Indexing and slicing arrays
()
Array operations
()
Challenge: Array operations
()
Solution: Array operations
()
Filtering arrays and modifying array values
()
The where() function
()
Challenge: Filtering and modifying arrays
()
Solution: Filtering and modifying arrays
()
Array aggregation
()
Array functions
()
Sorting arrays
()
Challenge: Aggregation and sorting
()
Solution: Aggregation and sorting
()
Vectorization
()
Broadcasting
()
Challenge: Bringing it all together
()
Solution: Bringing it all together
()
Key takeaways
()
2. pandas Series
Series basics
()
pandas data types and type conversion
()
Challenge: Data types and type conversion
()
Solution: Data types and type conversion
()
The series index and custom indices
()
The .iloc accessor
()
The .loc accessor
()
Duplicate index values and resetting the index
()
Challenge: Accessing data and resetting the index
()
Solution: Accessing data and resetting the index
()
Filtering series and logical tests
()
Sorting series
()
Challenge: Sorting and filtering series
()
Solution: Sorting and filtering series
()
Numeric series operations
()
Text series operations
()
Challenge: Series operations
()
Solution: Series operations
()
Numerical series aggregation
()
Categorical series aggregation
()
Challenge: Series aggregation
()
Solution: Series aggregation
()
Missing data representation in pandas
()
Identifying missing data
()
Fixing missing data
()
Challenge: Missing data
()
Solution: Missing data
()
Applying custom functions to series
()
pandas where() vs. NumPy where()
()
Challenge: apply() and where()
()
Solution: apply() and where()
()
Key takeaways
()
3. Intro to DataFrames
DataFrame basics
()
Creating a DataFrame
()
Challenge: DataFrame basics
()
Solution: DataFrame basics
()
Exploring DataFrames: Heads, tails, and sample
()
Exploring DataFrames: Info and describe
()
Challenge: Exploring a DataFrame
()
Solution: Exploring a DataFrame
()
Accessing DataFrame columns
()
Accessing DataFrame data with .iloc and .loc
()
Challenge: Accessing DataFrame data
()
Solution: Accessing DataFrame data
()
Dropping columns and rows
()
Identifying and dropping duplicates
()
Challenge: Dropping data
()
Solution: Dropping data
()
Missing data
()
Challenge: Missing data
()
Solution: Missing data
()
Filtering DataFrames
()
Pro tip: The query() method
()
Challenge: Filtering DataFrames
()
Solution: Filtering DataFrames
()
Sorting DataFrames
()
Challenge: Sorting DataFrames
()
Solution: Sorting DataFrames
()
Renaming and reordering columns
()
Challenge: Renaming and reordering columns
()
Solution: Renaming and reordering columns
()
Arithmetic and Boolean column creation
()
Challenge: Arithmetic and Boolean columns
()
Solution: Arithmetic and Boolean columns
()
Pro tip: Advanced conditional columns with select()
()
Challenge: The select() function
()
Solution: The select() function
()
The map() method
()
Pro tip: Multiple column creation with assign()
()
Challenge: map() and assign()
()
Solution: map() and assign()
()
The categorical data type
()
Type conversion
()
Pro tip: Memory usage and data types
()
Pro tip: Downcasting numeric data types
()
Challenge: DataFrame data types
()
Solution: DataFrame data types
()
Key takeaways
()
4. Aggregating and Reshaping DataFrames
Basic aggregations
()
The groupby() method
()
Challenge: groupby()
()
Solution: groupby()
()
Grouping by multiple columns
()
Challenge: Grouping by multiple columns
()
Solution: Grouping by multiple columns
()
MultiIndex DataFrames
()
Modifying a MultiIndex
()
Challenge: MultiIndex DataFrames
()
Solution: MultiIndex DataFrames
()
The agg() method and named aggregations
()
Challenge: The agg() method
()
Solution: The agg() method
()
Pro tip: Transforming DataFrames
()
Challenge: Transforming a DataFrame
()
Solution: Transforming a DataFrame
()
Pivot tables in pandas
()
Multiple aggregation pivot tables
()
Pro tip: Pivot table heatmaps
()
Melting DataFrames
()
Challenge: pivot() and melt()
()
Solution: pivot() and melt()
()
Key takeaways
()
5. Basic Data Visualization
The Matplotlib API and the plot() method
()
Challenge: Basic line chart
()
Solution: Basic line chart
()
Chart titles
()
Chart colors
()
Line styles
()
Chart legends and gridlines
()
Chart styles
()
Challenge: Stylized line chart
()
Solution: Stylized line chart
()
Subplots and figure size
()
Challenge: Subplots
()
Solution: Subplots
()
Bar charts
()
Grouped and stacked bar charts
()
Challenge: Bar charts
()
Solution: Bar charts
()
Pie charts and scatterplots
()
Challenge: Scatterplots
()
Solution: Scatterplots
()
Histograms
()
Challenge: Histograms
()
Solution: Histograms
()
Saving plots and further exploration
()
Key takeaways
()
6. Mid-Course Project
Mid-course project intro
()
Solution: Mid-course project
()
7. Analyzing Dates and Times
Times in Python and pandas
()
Converting to datetimes
()
Formatting dates
()
Date and time parts
()
Challenge: pandas datetime basics
()
Solution: pandas datetime basics
()
Time deltas and arithmetic
()
Challenge: Time deltas
()
Solution: Time deltas
()
Time series indices
()
Missing time series data
()
Challenge: Missing time series data
()
Solution: Missing time series data
()
Shifting time series
()
Pro tip: diff()
()
Challenge: shift() and diff()
()
Solution: shift() and diff()
()
Aggregation and resampling
()
Challenge: Resampling
()
Solution: Resampling
()
Rolling aggregations
()
Challenge: Rolling aggregations
()
Solution: Rolling aggregations
()
Key takeaways
()
8. Importing and Exporting Data
Preprocessing with read_csv()
()
Column selection
()
Row selection and missing values
()
Parsing dates and data types
()
Pro tip: Converters
()
Challenge: Importing data
()
Solution: Importing data
()
Importing from text and Excel files
()
Exporting to flat files
()
Challenge: Importing and exporting Excel data
()
Solution: Importing and exporting Excel data
()
Working with SQL databases
()
Other supported file formats
()
Key takeaways
()
9. Joining DataFrames
Why use multiple tables?
()
Appending DataFrames
()
Challenge: Appending DataFrames
()
Solution: Appending DataFrames
()
Joining DataFrames
()
Join types
()
Inner joins
()
Left joins
()
Challenge: Joining DataFrames
()
Solution: Joining DataFrames
()
The join() method
()
Key takeaways
()
10. Final Course Project
Final project intro
()
Solution: Final project
()