O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Beginning Data Analysis with Python And Jupyter

Book Description

Getting started with data science doesn't have to be an uphill battle. This step-by-step guide is ideal for beginners who know a little Python and are looking for a quick, fast-paced introduction.

About This Book
  • Get up and running with the Jupyter ecosystem and some example datasets
  • Learn about key machine learning concepts like SVM, KNN classifiers and Random Forests
  • Discover how you can use web scraping to gather and parse your own bespoke datasets
Who This Book Is For

This book is ideal for professionals with a variety of job descriptions across large range of industries, given the rising popularity and accessibility of data science. You'll need some prior experience with Python, with any prior work with libraries like Pandas, Matplotlib and Pandas providing you a useful head start.

What You Will Learn
  • Identify potential areas of investigation and perform exploratory data analysis
  • Plan a machine learning classification strategy and train classification models
  • Use validation curves and dimensionality reduction to tune and enhance your models
  • Scrape tabular data from web pages and transform it into Pandas DataFrames
  • Create interactive, web-friendly visualizations to clearly communicate your findings
In Detail

Get to grips with the skills you need for entry-level data science in this hands-on Python and Jupyter course. You'll learn about some of the most commonly used libraries that are part of the Anaconda distribution, and then explore machine learning models with real datasets to give you the skills and exposure you need for the real world. We'll finish up by showing you how easy it can be to scrape and gather your own data from the open web, so that you can apply your new skills in an actionable context.

Style and approach

This book covers every aspect of the standard data-workflow process within a day, along with theory, practical hands-on coding, and relatable illustrations.

Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Beginning Data Science with Python and Jupyter
    1. Table of Contents
    2. Beginning Data Science with Python and Jupyter
      1. Why Subscribe?
      2. PacktPub.com
    3. Contributors
      1. About the author
      2. About the reviewer
      3. Packt is searching for authors like you
    4. Preface
      1. What This Book Covers
      2. What You Need for This Book
        1. Installation and Setup
          1. Installing Anaconda
          2. Updating Jupyter and Installing Dependencies
      3. Who This Book is for
      4. Conventions
      5. Reader Feedback
      6. Customer Support
        1. Downloading the Example Code
        2. Errata
        3. Piracy
      7. Questions
    5. 1. Jupyter Fundamentals
      1. Lesson Objectives
      2. Basic Functionality and Features
        1. Subtopic A: What is a Jupyter Notebook and Why is it Useful?
        2. Subtopic B: Navigating the Platform
          1. Introducing Jupyter Notebooks
        3. Subtopic C: Jupyter Features
          1. Explore some of Jupyter's most useful features
          2. Converting a Jupyter Notebook to a Python Script
        4. Subtopic D: Python Libraries
          1. Import the external libraries and set up the plotting environment
      3. Our First Analysis - The Boston Housing Dataset
        1. Subtopic A: Loading the Data into Jupyter Using a Pandas DataFrame
          1. Load the Boston housing dataset
        2. Subtopic B: Data Exploration
          1. Explore the Boston housing dataset
        3. Subtopic C: Introduction to Predictive Analytics with Jupyter Notebooks
          1. Linear models with Seaborn and scikit-learn
        4. Activity B: Building a Third-Order Polynomial Model
        5. Subtopic D: Using Categorical Features for Segmentation Analysis
          1. Create categorical fields from continuous variables and make segmented visualizations
      4. Summary
    6. 2. Data Cleaning and Advanced Machine Learning
      1. Preparing to Train a Predictive Model
        1. Subtopic A: Determining a Plan for Predictive Analytics
        2. Subtopic B: Preprocessing Data for Machine Learning
          1. Explore data preprocessing tools and methods
        3. Activity A: Preparing to Train a Predictive Model for the Employee-Retention Problem
      2. Training Classification Models
        1. Subtopic A: Introduction to Classification Algorithms
          1. Training two-feature classification models with scikit-learn
          2. The plot_decision_regions Function
          3. Training k-nearest neighbors for our model
          4. Training a Random Forest
        2. Subtopic B: Assessing Models with k-Fold Cross-Validation and Validation Curves
          1. Using k-fold cross validation and validation curves in Python with scikit-learn
        3. Subtopic C: Dimensionality Reduction Techniques
          1. Training a predictive model for the employee retention problem
      3. Summary
    7. 3. Web Scraping and Interactive Visualizations
      1. Lesson Objectives
      2. Scraping Web Page Data
        1. Subtopic A: Introduction to HTTP Requests
        2. Subtopic B: Making HTTP Requests in the Jupyter Notebook
          1. Handling HTTP requests with Python in a Jupyter Notebook
        3. Subtopic C: Parsing HTML in the Jupyter Notebook
          1. Parsing HTML with Python in a Jupyter Notebook
        4. Activity A: Web Scraping with Jupyter Notebooks
      3. Interactive Visualizations
        1. Subtopic A: Building a DataFrame to Store and Organize Data
          1. Building and merging Pandas DataFrames
        2. Subtopic B: Introduction to Bokeh
          1. Introduction to interactive visualizations with Bokeh
        3. Activity B: Exploring Data with Interactive Visualizations
      4. Summary
    8. Index