Skip to Main Content
Hands-On Data Analysis with NumPy and pandas
book

Hands-On Data Analysis with NumPy and pandas

by Curtis Miller
June 2018
Beginner to intermediate content levelBeginner to intermediate
168 pages
3h 40m
English
Packt Publishing
Content preview from Hands-On Data Analysis with NumPy and pandas

Arithmetic

Let's see an example. The first thing we'll do is start up pandas and NumPy.

In the following screenshot, we have two series, srs1 and srs2:

srs1 has an index that goes from 0 to 4, whereas srs2 has an index that goes from 0 to 3, skips 4, and then goes to 5. These two series are technically the same length, but that doesn't necessarily mean that the elements will match up as you might expect. For example, let's consider the following code. What happens when we add srs1 and srs2?

Two NaNs were produced. That was because, for elements ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Data Analysis with Pandas

Hands-On Data Analysis with Pandas

Stefanie Molin
Python: End-to-end Data Analysis

Python: End-to-end Data Analysis

Phuong Vothihong, Martin Czygan, Ivan Idris, Magnus Vilhelm Persson, Luiz Felipe Martins
Python: Data Analytics and Visualization

Python: Data Analytics and Visualization

Phuong Vo.T.H, Martin Czygan, Ashish Kumar, Kirthi Raman

Publisher Resources

ISBN: 9781789530797Supplemental Content