All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Published by Packt Publishing Ltd.
Birmingham B3 2PB, UK.
Credits
Author
Femi Anthony
Reviewers
Opeyemi Akinjayeju
Louis Hnault
Carlos Marin
Commissioning Editor
Karthikey Pandey
Acquisition Editor
Kevin Colaco
Content Development Editor
Arun Nadar
Technical Editor
Mohita Vyas
Copy Editors
Tani Kothari
Jasmine Nadar
Vikrant Phadke
Project Coordinator
Neha Bhatnagar
Proofreader
Safis Editing
Indexer
Tejal Soni
Graphics
Jason Monteiro
Production Coordinator
Aparna Bhagat
Cover Work
Aparna Bhagat
About the Author
Femi Anthony is a seasoned and knowledgeable software programmer, with over 15 years experience in a vast array of languages, including Perl, C, C++, Java, and Python. He has worked in both the Internet space and financial services space for many years and is now working for a well-known financial data company. He holds a bachelor's degree in mathematics with computer science from MIT and a master's degree from the University of Pennsylvania. His pet interests include data science, machine learning, and Python. Femi is working on a few side projects in these areas. His hobbies include reading, soccer, and road cycling. You can follow him at @dataphanatik
, and for any queries, contact him at <>
.
First and foremost, I would like to thank my wife, Ene, for her support throughout my career and in writing this book. She has been my inspiration and motivation for continuing to improve my knowledge and helping me move ahead in my career. She is my rock, and I dedicate this book to her. I also thank my wonderful children, Femi, Lara, and our new addition, Temi, for always making me smile and for understanding on those days when I was writing this book instead of playing games with them.
I would also like to thank my book reviewersOpeyemi Akinjayeju, who is a dear friend of mine, as well as Louis Hnault and Carlos Marinfor their invaluable feedback and input toward the completion of this book. Lastly, I would like to thank my parents, George and Katie Anthony, for instilling a strong work ethic in me from an early age.
About the Reviewers
Opeyemi Akinjayeju is risk management professional. He holds graduate degrees in statistics (Penn State University) and economics (Georgia Southern University), and has built predictive models for insurance companies, banks, captive automotive finance lenders, and consulting firms. He enjoys analyzing data and solving complex business problems using SAS, R, EViews/Gretl, Minitab, SQL, and Python. Opeyemi is also an adjunct at Northwood University where he designs and teaches undergraduate courses in microeconomics and macroeconomics.
Louis Hnault is a data scientist at OgilvyOne Paris. He loves combining mathematics and computer science to solve real-world problems in an innovative way. After getting a master's degree in engineering with a major in data sciences and another degree in applied mathematics in France, he entered into the French start-up ecosystem, working on several projects. Louis has gained experience in various industries, including geophysics, application performance management, online music platforms, e-commerce, and digital advertising. He is now working for a leading customer engagement agency, where he helps clients unlock the complete value of customers using big data.
I've met many outstanding people in my life who have helped me become what I am today. A great thank you goes to the professors, authors, and colleagues who taught me many fantastic things. Of course, I can't end this without a special thought for my friends and family.
Carlos Marin is a software engineer at Rackspace, where he maintains and develops a suite of applications that manage networking devices in Rackspace's data centers. He has made contributions to OpenStack, and has worked with multiple teams and on multiple projects within Rackspace, from the Identity API to big data and analytics.
Carlos graduated with a degree in computer engineering from the National Autonomous University of Mexico. Prior to joining Rackspace, he worked as a consultant, developing software for multiple financial enterprises in programming languages. In Austin, Texas, he regularly attends local technology events and user groups. He also spends time volunteering and pursuing outdoor adventures.
I'm grateful to my parents and family, who have always believed in me.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at > for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
- Fully searchable across every book published by Packt
- Copy and paste, print, and bookmark content
- On demand and accessible via a web browser
Free access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Preface
Welcome to Mastering pandas . This book will teach you how to effectively use pandas, which is a one of the most popular Python packages today for performing data analysis. The first half of this book starts off with the rationale for performing data analysis. Then it introduces Python and pandas in particular, taking you through the installation steps, what pandas is all about, what it can be used for, data structures in pandas, and how to select, merge and group data in pandas. Then it covers handling missing data and time series data, as well as plotting for data visualization.