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)

Operations and manipulations of pandas

There are a number of operation methods used to work in pandas. In this section of the chapter, we will look into some of the common operations that we will be doing in this book.

Inspection of data

The first thing that you will want to do when loading a DataFrame or creating a DataFrame from a file is to inspect the data that you just loaded. We have two methods for inspecting the data:

  • Head
  • Tail

The head method will show us the data of the first five rows:

As you can see in the preceding screenshot, we have the first five rows and 34 columns displayed on running the data.head() method:

To take a look at the last five rows of data, you use the tail method. The preceding screenshot...