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)

Answering further questions

Let's say that you are done with the first round of questions that the HR director asked you, but now he wants to know a little more about the employees. The following are the new tasks assigned to you:

  • Give me a list of the employees with a Low level of JobSatisfaction
  • Give me a list of the employees with a Low level of both JobSatisfaction and JobInvolvement
  • Compare the employees with Low and Very High JobSatisfaction across the following variables: Age, Department, and DistanceFromHome

Employees with Low JobSatisfaction

To answer this question, we use a Boolean Series to index a series or a DataFrame. This is called masking, or Boolean indexing. First, we use the comparison operator to...