Reader small image

You're reading from  scikit-learn Cookbook - Second Edition

Product typeBook
Published inNov 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781787286382
Edition2nd Edition
Languages
Right arrow
Author (1)
Trent Hauck
Trent Hauck
author image
Trent Hauck

Trent Hauck is a data scientist living and working in the Seattle area. He grew up in Wichita, Kansas and received his undergraduate and graduate degrees from the University of Kansas. He is the author of the book Instant Data Intensive Apps with pandas How-to, Packt Publishing—a book that can get you up to speed quickly with pandas and other associated technologies.
Read more about Trent Hauck

Right arrow

Viewing the Pima Indians diabetes dataset with pandas

How to do it...

  1. You can view the data in various ways. View the top of the dataframe:
all_data.head()
  1. Nothing seems amiss here, except possibly an insulin level of zero. Is this possible? What about the skin_mm variable? Can that be zero? Make a note about it as a comment in your IPython:
#Is an insulin level of 0 possible? Is a skin_mm of 0 possible?
  1. Get a rough overview of the dataframe with the describe() method:
all_data.describe()
  1. Make a note again in your notebook about additional zeros:
#The features plasma_con, blood_pressure, skin_mm, insulin, bmi have 0s as values. These values could be physically impossible.
  1. Draw a histogram of the pregnancy_x variable...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
scikit-learn Cookbook - Second Edition
Published in: Nov 2017Publisher: PacktISBN-13: 9781787286382

Author (1)

author image
Trent Hauck

Trent Hauck is a data scientist living and working in the Seattle area. He grew up in Wichita, Kansas and received his undergraduate and graduate degrees from the University of Kansas. He is the author of the book Instant Data Intensive Apps with pandas How-to, Packt Publishing—a book that can get you up to speed quickly with pandas and other associated technologies.
Read more about Trent Hauck