Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Pandas Cookbook

You're reading from   Pandas Cookbook Practical recipes for scientific computing, time series, and exploratory data analysis using Python

Arrow left icon
Product type Paperback
Published in Oct 2024
Publisher Packt
ISBN-13 9781836205876
Length 404 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
William Ayd William Ayd
Author Profile Icon William Ayd
William Ayd
Matthew Harrison Matthew Harrison
Author Profile Icon Matthew Harrison
Matthew Harrison
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. pandas Foundations FREE CHAPTER 2. Selection and Assignment 3. Data Types 4. The pandas I/O System 5. Algorithms and How to Apply Them 6. Visualization 7. Reshaping DataFrames 8. Group By 9. Temporal Data Types and Algorithms 10. General Usage and Performance Tips 11. The pandas Ecosystem 12. Index

Reshaping DataFrames

Working with data is hard. Rarely, if ever, can you just collect data and have it immediately yield insights. Often, significant time and effort must be put into cleansing, transforming, and reshaping your data to get it into a format that is usable, digestible, and/or understandable.

Is your source data a collection of CSV files, where each file represents a different day? Proper use of pd.concat will help you take those files and combine them into one with ease.

Does the relational database you use as a source store data in a normalized form, while the target columnar database would prefer to ingest data all in one table? pd.merge can help you combine your data together.

What if your boss asks you to take millions of rows of data and, from that, produce a nice summary report that anyone in the business can understand? pd.pivot_table is the right tool for the job here, allowing you to quickly and easily summarize your data.

Ultimately, the reasons...

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 $19.99/month. Cancel anytime