Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning pandas

You're reading from   Learning pandas High performance data manipulation and analysis using Python

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher
ISBN-13 9781787123137
Length 446 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Michael Heydt Michael Heydt
Author Profile Icon Michael Heydt
Michael Heydt
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Title Page
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. pandas and Data Analysis FREE CHAPTER 2. Up and Running with pandas 3. Representing Univariate Data with the Series 4. Representing Tabular and Multivariate Data with the DataFrame 5. Manipulating DataFrame Structure 6. Indexing Data 7. Categorical Data 8. Numerical and Statistical Methods 9. Accessing Data 10. Tidying Up Your Data 11. Combining, Relating, and Reshaping Data 12. Data Aggregation 13. Time-Series Modelling 14. Visualization 15. Historical Stock Price Analysis

Performing numerical methods on pandas objects


pandas provides a rich set of functions and operations that facilitate the ability to perform arithmetic operations and to calculate various numerical characteristics of data. In this section, we will examine many of these, including:

  • Performing arithmetic on a DataFrame or Series
  • Getting the counts of values
  • Determining unique values (and their counts)
  • Finding minimum and maximum values
  • Locating the n-smallest and n-largest values
  • Calculating accumulated values

Performing arithmetic on a DataFrame or Series

Arithmetic operations can be performed on a DataFrame (and Series) using the +, -, /, and * operators. While these may seem trivial in nature, pandas adds a powerful twist by performing alignment of the values on the left and right sides of the equations. Hence indexes play a big part in arithmetic, and how this affects the results needs to be understood by the user of pandas.

Additionally, pandas not only provides the standard operators for arithmetic...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images