Book Image

Python Data Science Essentials

By : Alberto Boschetti, Luca Massaron
Book Image

Python Data Science Essentials

By: Alberto Boschetti, Luca Massaron

Overview of this book

The book starts by introducing you to setting up your essential data science toolbox. Then it will guide you across all the data munging and preprocessing phases. This will be done in a manner that explains all the core data science activities related to loading data, transforming and fixing it for analysis, as well as exploring and processing it. Finally, it will complete the overview by presenting you with the main machine learning algorithms, the graph analysis technicalities, and all the visualization instruments that can make your life easier in presenting your results. In this walkthrough, structured as a data science project, you will always be accompanied by clear code and simplified examples to help you understand the underlying mechanics and real-world datasets.
Table of Contents (13 chapters)

Introducing EDA

Exploratory Data Analysis (EDA) is the first step in the data science process. This term was coined by John Tukey in 1977, which was when he first wrote a book emphasizing the importance of Exploratory Data Analysis. It's required to understand the dataset better, check its features and shape, validate some hypothesis that you have in mind, and have a preliminary idea about the next step that you want to pursue in the following data science tasks.

In this section, you will work on the iris dataset, which was already used in the previous chapter. First, let's load the dataset:

In: iris_filename = './datasets-uci-iris.csv'
In: iris = pd.read_csv(iris_filename, header=None, names= ['sepal_length', 'sepal_width', 'petal_length', 'petal_width', 'target'])
   sepal_length  sepal_width  petal_length  petal_width       target
0           5.1          3.5           1.4          0.2  Iris-setosa
1           4.9          3.0           1.4          0.2  Iris-setosa