Skip to Main Content
Ensemble Machine Learning Cookbook
book

Ensemble Machine Learning Cookbook

by Dipayan Sarkar, Vijayalakshmi Natarajan
January 2019
Beginner to intermediate content levelBeginner to intermediate
336 pages
7h 58m
English
Packt Publishing
Content preview from Ensemble Machine Learning Cookbook

How to do it...

Let's start by analyzing variables with missing values. Set the options in pandas to view all rows and columns, as shown in the previous section:

  1. With the following syntax, we can see which variables have missing values:
# Check which variables have missing valuescolumns_with_missing_values = housepricesdata.columns[housepricesdata.isnull().any()]housepricesdata[columns_with_missing_values].isnull().sum()

This will produce the following output:

  1. You might also like to see the missing values in terms of percentages. To see the count and percentage of missing values, execute the following command:
import numpy as npimport ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Productive and Efficient Data Science with Python: With Modularizing, Memory profiles, and Parallel/GPU Processing

Productive and Efficient Data Science with Python: With Modularizing, Memory profiles, and Parallel/GPU Processing

Tirthajyoti Sarkar
Hands-On Automated Machine Learning

Hands-On Automated Machine Learning

Sibanjan Das, Umit Mert Cakmak

Publisher Resources

ISBN: 9781789136609Supplemental Content