Beginning Data Analysis with Python and Jupyter
Table of Contents
Beginning Data Analysis with Python and Jupyter
Why Subscribe?
PacktPub.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
What This Book Covers
What You Need for This Book
Installation and Setup
Installing Anaconda
Updating Jupyter and Installing Dependencies
Who This Book is for
Conventions
Reader Feedback
Customer Support
Downloading the Example Code
Errata
Piracy
Questions
1. Jupyter Fundamentals
Lesson Objectives
Basic Functionality and Features
Subtopic A: What is a Jupyter Notebook and Why is it Useful?
Subtopic B: Navigating the Platform
Introducing Jupyter Notebooks
Subtopic C: Jupyter Features
Explore some of Jupyter's most useful features
Converting a Jupyter Notebook to a Python Script
Subtopic D: Python Libraries
Import the external libraries and set up the plotting environment
Our First Analysis - The Boston Housing Dataset
Subtopic A: Loading the Data into Jupyter Using a Pandas DataFrame
Load the Boston housing dataset
Subtopic B: Data Exploration
Explore the Boston housing dataset
Subtopic C: Introduction to Predictive Analytics with Jupyter Notebooks
Linear models with Seaborn and scikit-learn
Activity B: Building a Third-Order Polynomial Model
Subtopic D: Using Categorical Features for Segmentation Analysis
Create categorical fields from continuous variables and make segmented visualizations
Summary
2. Data Cleaning and Advanced Machine Learning
Preparing to Train a Predictive Model
Subtopic A: Determining a Plan for Predictive Analytics
Subtopic B: Preprocessing Data for Machine Learning
Explore data preprocessing tools and methods
Activity A: Preparing to Train a Predictive Model for the Employee-Retention Problem
Training Classification Models
Subtopic A: Introduction to Classification Algorithms
Training two-feature classification models with scikit-learn
The plot_decision_regions Function
Training k-nearest neighbors for our model
Training a Random Forest
Subtopic B: Assessing Models with k-Fold Cross-Validation and Validation Curves
Using k-fold cross validation and validation curves in Python with scikit-learn
Subtopic C: Dimensionality Reduction Techniques
Training a predictive model for the employee retention problem
Summary
3. Web Scraping and Interactive Visualizations
Lesson Objectives
Scraping Web Page Data
Subtopic A: Introduction to HTTP Requests
Subtopic B: Making HTTP Requests in the Jupyter Notebook
Handling HTTP requests with Python in a Jupyter Notebook
Subtopic C: Parsing HTML in the Jupyter Notebook
Parsing HTML with Python in a Jupyter Notebook
Activity A: Web Scraping with Jupyter Notebooks
Interactive Visualizations
Subtopic A: Building a DataFrame to Store and Organize Data
Building and merging Pandas DataFrames
Subtopic B: Introduction to Bokeh
Introduction to interactive visualizations with Bokeh
Activity B: Exploring Data with Interactive Visualizations
Summary
Index
Beginning Data Analysis with Python and Jupyter
Copyright © 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Acquisition Editor: Aditya Date
Content Development Editor: Murtaza Haamid
Production Coordinator: Vishal Pawar
First published: May 2018
Production reference: 1310518
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78953-202-9
www.packtpub.com
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
- Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
- Learn better with Skill Plans built especially for you
- Get a free eBook or video every month
- Mapt is fully searchable
- Copy and paste, print, and bookmark content
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at
www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
[email protected]
for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Alex Galea has been professionally practicing data analytics since graduating with a Master's degree in Physics from the University of Guelph, Canada. He developed a keen interest in Python while researching quantum gases as part of his graduate studies. Alex is currently doing web data analytics, where Python continues to play a key role in his work. He is a frequent blogger about data-centric projects that involve Python and Jupyter Notebooks.
Elie Kawerk likes to solve problems using the analytical skills he has accumulated over the years. He uses the data science process, including statistical methods and machine learning, to extract insights from data and get value out of it.
His formal training is in computational physics. He used to simulate atomic and molecular physi...