Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Become a Python Data Analyst
Become a Python Data Analyst

Become a Python Data Analyst: Perform exploratory data analysis and gain insight into scientific computing using Python

eBook
€8.99 €15.99
Paperback
€19.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Become a Python Data Analyst

Vectorizing Operations with NumPy

In this chapter, we will learn about Numerical Python (NumPy) extensions, which is a library for the Python programming language, what it is, and why we need it. We will also look at arrays, which are the most important type of objects in the numpy library. We will learn how to work with arrays, what the most important methods are, and the attributes that we can use with arrays. Then, we will apply our knowledge and do some simulations to see how we use NumPy in the real world. By the end of this chapter, you will know all the foundations that you need to work with other libraries in Python's Data Science Stack, such as Matplotlib. We will also get into some motivating examples to see why we need NumPy and the main problem it solves.

We will cover the following topics:

  • Introduction to NumPy
  • NumPy arrays creation, methods, and attributes...

Introduction to NumPy

NumPy, also known as Python's vectorization solution, is the fundamental package for doing scientific computing with Python. It gives us the ability to create multidimensional array objects and to perform faster mathematical operations than we can do with base Python. It is the basis of most of Python's Data Science ecosystem. Most of the other libraries that we use in data analytics with Python, such as scikit-learn and pandas rely on NumPy. Some advanced features of NumPy are as follows:

  • It provides sophisticated (broadcasting) functions
  • It provides tools for integrating with lower-level languages such as C, C++, and Fortran
  • It has the ability to do linear algebra and complex mathematical operations such as Fourier Transform (FT) and random number generator (RNG)

So, if you need to do some really high-performance data analysis at scale and you...

NumPy arrays

NumPy's main object is a homogeneous multidimensional array. An array is essentially a table of elements (usually numbers), all of the same type, indexed by a tuple of positive integers. The index in NumPy arrays is zero-based, so the first element is the 0th element; the second element is the 1st element, and so on. In NumPy, dimensions are called axes and the number of axes, or dimensions, is called the rank or dimension of the array. To import NumPy into our Jupyter Notebook, we use the numpy as np convention import.

Creating arrays in NumPy

There are the following two methods to create arrays in Python:

  • Creating arrays from lists
  • Using the built-in functions that NumPy provides
...

Using NumPy for simulations

Now let's learn how to use NumPy in a real-world scenario. Here, we will cover two examples of simulations using NumPy, and in the process, we will also learn about other operations that we can do with arrays.

Coin flips

We will look into a coin flip, or coin toss, simulation using NumPy. For this purpose, we will use the randint function that comes in the random submodule from NumPy. This function takes the low, high, and size arguments, which will be the range of random integers that we want for the output. So, in this case, we want the output to be either 0 or 1, so the value for low will be 0 and high will be 2 but not including 2. Here, the size argument will define the number of random...

Summary

In this chapter, we learned about numpy, a library designed to do vectorized operations. We also learned about NumPy arrays, which are the main objects in NumPy. We learned how to create them, looked into their various attributes, explored which arrays are used in basic math, and did some manipulation with arrays. Then, we learned how to perform and run simple simulations using NumPy.

In the next chapter, we will look at pandas, the most popular library for doing data analysis in Python.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Cover all fundamental libraries for operation and manipulation of Python for data analysis
  • Implement real-world datasets to perform predictive analytics with Python
  • Access modern data analysis techniques and detailed code with scikit-learn and SciPy

Description

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.

Who is this book for?

Become a Python Data Analyst is for entry-level data analysts, data engineers, and BI professionals who want to make complete use of Python tools for performing efficient data analysis. Prior knowledge of Python programming is necessary to understand the concepts covered in this book

What you will learn

  • Explore important Python libraries and learn to install Anaconda distribution
  • Understand the basics of NumPy
  • Produce informative and useful visualizations for analyzing data
  • Perform common statistical calculations
  • Build predictive models and understand the principles of predictive analytics

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 31, 2018
Length: 178 pages
Edition : 1st
Language : English
ISBN-13 : 9781789534405
Category :
Languages :
Concepts :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Aug 31, 2018
Length: 178 pages
Edition : 1st
Language : English
ISBN-13 : 9781789534405
Category :
Languages :
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 77.97
Data Analysis with Python
€32.99
Become a Python Data Analyst
€19.99
Hands-On Data Analysis with NumPy and pandas
€24.99
Total 77.97 Stars icon
Banner background image

Table of Contents

7 Chapters
The Anaconda Distribution and Jupyter Notebook Chevron down icon Chevron up icon
Vectorizing Operations with NumPy Chevron down icon Chevron up icon
Pandas - Everyone's Favorite Data Analysis Library Chevron down icon Chevron up icon
Visualization and Exploratory Data Analysis Chevron down icon Chevron up icon
Statistical Computing with Python Chevron down icon Chevron up icon
Introduction to Predictive Analytics Models Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(510 Ratings)
5 star 51%
4 star 35.3%
3 star 11%
2 star 1.4%
1 star 1.4%
Filter icon Filter
Top Reviews

Filter reviews by




Amazon Customer Jan 19, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great book to get started in Python Data manipulation. They build up the why on Series and Dataframes in a couple of pages. It's very clear and easy to read for a beginner.
Amazon Verified review Amazon
Anonymized User Aug 15, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Udemy Verified review Udemy
Joao Paulo Aragao Pereira Aug 13, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Udemy Verified review Udemy
Nissy Mary Joseph May 18, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Udemy Verified review Udemy
Selina Ma May 17, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Udemy Verified review Udemy
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.