Book Image

Become a Python Data Analyst

By : Alvaro Fuentes
Book Image

Become a Python Data Analyst

By: Alvaro Fuentes

Overview of this book

Python is one of the most common and popular languages preferred by leading data analysts and statisticians for working with massive datasets and complex data visualizations. Become a Python Data Analyst introduces Python’s most essential tools and libraries necessary to work with the data analysis process, right from preparing data to performing simple statistical analyses and creating meaningful data visualizations. In this book, we will cover Python libraries such as NumPy, pandas, matplotlib, seaborn, SciPy, and scikit-learn, and apply them in practical data analysis and statistics examples. As you make your way through the chapters, you will learn to efficiently use the Jupyter Notebook to operate and manipulate data using NumPy and the pandas library. In the concluding chapters, you will gain experience in building simple predictive models and carrying out statistical computation and analysis using rich Python tools and proven data analysis techniques. By the end of this book, you will have hands-on experience performing data analysis with Python.
Table of Contents (8 chapters)

Analyzing variables individually

First, let's define the names of the variables that we are going to use in this analysis. We have a list of the numerical variables and a list of the categorical variables. Then, we will redefine our housing DataFrame with a DataFrame that contains only the variables that we just defined. Then, we use the shape attribute to see the size of the new DataFrame:

In the preceding diagram, we can see that the shape of our DataFrame has now changed because we have only 15 columns.

Understanding the main variable

Let's talk about the main variable that we want to understand, the SalePrice of the house. The first thing that we do when we have a categorical variable is that we usually want...