
Pandas for Everyone: Python Data Analysis, 2nd Edition
- Length: 512 pages
- Edition: 2
- Language: English
- Publisher: Addison-Wesley Professional
- Publication Date: 2023-01-01
- ISBN-10: 0137891156
- ISBN-13: 9780137891153
- Sales Rank: #636653 (See Top 100 Books)
Manage and Automate Data Analysis with Pandas in Python
Today, analysts must manage data characterized by extraordinary variety, velocity, and volume. Using the open source Pandas library, you can use Python to rapidly automate and perform virtually any data analysis task, no matter how large or complex. Pandas can help you ensure the veracity of your data, visualize it for effective decision-making, and reliably reproduce analyses across multiple data sets.
Pandas for Everyone, 2nd Edition, brings together practical knowledge and insight for solving real problems with Pandas, even if you’re new to Python data analysis. Daniel Y. Chen introduces key concepts through simple but practical examples, incrementally building on them to solve more difficult, real-world data science problems such as using regularization to prevent data overfitting, or when to use unsupervised machine learning methods to find the underlying structure in a data set.
New features to the second edition include: Extended coverage of plotting and the seaborn data visualization library Expanded examples and resources Updated Python 3.9 code and packages coverage, including statsmodels and scikit-learn libraries Online bonus material on geopandas, Dask, and creating interactive graphics with Altair
Chen gives you a jumpstart on using Pandas with a realistic data set and covers combining data sets, handling missing data, and structuring data sets for easier analysis and visualization. He demonstrates powerful data cleaning techniques, from basic string manipulation to applying functions simultaneously across dataframes.
Once your data is ready, Chen guides you through fitting models for prediction, clustering, inference, and exploration. He provides tips on performance and scalability and introduces you to the wider Python data analysis ecosystem. Work with DataFrames and Series, and import or export data Create plots with matplotlib, seaborn, and pandas Combine data sets and handle missing data Reshape, tidy, and clean data sets so they’re easier to work with Convert data types and manipulate text strings Apply functions to scale data manipulations Aggregate, transform, and filter large data sets with groupby Leverage Pandas’ advanced date and time capabilities Fit linear models using statsmodels and scikit-learn libraries Use generalized linear modeling to fit models with different response variables Compare multiple models to select the “best” one Regularize to overcome overfitting and improve performance Use clustering in unsupervised machine learning
Cover Page About This eBook Halftitle Page Title Page Copyright Page Pearson’s Commitment to Diversity, Equity, and Inclusion Dedication Page Contents Foreword to Second Edition Foreword to First Edition Preface Breakdown of the Book How to Read This Book Setup Feedback, Please! Acknowledgments Acknowledgments from the First Edition About the Author Changes in the Second Edition Part I: Introduction 1. Pandas DataFrame Basics 1.1 Introduction Learning Objectives 1.2 Load Your First Data Set 1.3 Look at Columns, Rows, and Cells 1.4 Grouped and Aggregated Calculations 1.5 Basic Plot Conclusion 2. Pandas Data Structures Basics Learning Objectives 2.1 Create Your Own Data 2.2 The Series 2.3 The DataFrame 2.4 Making Changes to Series and DataFrames 2.5 Exporting and Importing Data Conclusion 3. Plotting Basics Learning Objectives 3.1 Why Visualize Data? 3.2 Matplotlib Basics 3.3 Statistical Graphics Using matplotlib 3.4 Seaborn 3.5 Pandas Plotting Method Conclusion 4. Tidy Data Learning Objectives 4.1 Columns Contain Values, Not Variables 4.2 Columns Contain Multiple Variables 4.3 Variables in Both Rows and Columns Conclusion 5. Apply Functions Learning Objectives 5.1 Primer on Functions 5.2 Apply (Basics) 5.3 Vectorized Functions 5.4 Lambda Functions (Anonymous Functions) Conclusion Part II: Data Processing 6. Data Assembly Learning Objectives 6.1 Combine Data Sets 6.2 Concatenation 6.3 Observational Units Across Multiple Tables 6.4 Merge Multiple Data Sets Conclusion 7. Data Normalization Learning Objectives 7.1 Multiple Observational Units in a Table (Normalization) Conclusion 8. Groupby Operations: Split-Apply-Combine Learning Objectives 8.1 Aggregate 8.2 Transform 8.3 Filter 8.4 The pandas.core.groupby. DataFrameGroupBy object 8.5 Working With a MultiIndex Conclusion Part III: Data Types 9. Missing Data Learning Objectives 9.1 What Is a NaN Value? 9.2 Where Do Missing Values Come From? 9.3 Working With Missing Data 9.4 Pandas Built-In NA Missing Conclusion 10. Data Types Learning Objectives 10.1 Data Types 10.2 Converting Types 10.3 Categorical Data Conclusion 11. Strings and Text Data Introduction Learning Objectives 11.1 Strings 11.2 String Methods 11.3 More String Methods 11.4 String Formatting (F-Strings) 11.5 Regular Expressions (RegEx) 11.6 The regex Library Conclusion 12. Dates and Times Learning Objectives 12.1 Python’s datetime Object 12.2 Converting to datetime 12.3 Loading Data That Include Dates 12.4 Extracting Date Components 12.5 Date Calculations and Timedeltas 12.6 Datetime Methods 12.7 Getting Stock Data 12.8 Subsetting Data Based on Dates 12.9 Date Ranges 12.10 Shifting Values 12.11 Resampling 12.12 Time Zones 12.13 Arrow for Better Dates and Times Conclusion Part IV: Data Modeling 13. Linear Regression (Continuous Outcome Variable) 13.1 Simple Linear Regression 13.2 Multiple Regression 13.3 Models with Categorical Variables 13.4 One-Hot Encoding in scikit-learn with Transformer Pipelines Conclusion 14. Generalized Linear Models About This Chapter 14.1 Logistic Regression (Binary Outcome Variable) 14.2 Poisson Regression (Count Outcome Variable) 14.3 More Generalized Linear Models Conclusion 15. Survival Analysis 15.1 Survival Data 15.2 Kaplan Meier Curves 15.3 Cox Proportional Hazard Model Conclusion 16. Model Diagnostics 16.1 Residuals 16.2 Comparing Multiple Models 16.3 k-Fold Cross-Validation Conclusion 17. Regularization 17.1 Why Regularize? 17.2 LASSO Regression 17.3 Ridge Regression 17.4 Elastic Net 17.5 Cross-Validation Conclusion 18. Clustering 18.1 k-Means 18.2 Hierarchical Clustering Conclusion Part V: Conclusion 19. Life Outside of Pandas 19.1 The (Scientific) Computing Stack 19.2 Performance 19.3 Dask 19.4 Siuba 19.5 Ibis 19.6 Polars 19.7 PyJanitor 19.8 Pandera 19.9 Machine Learning 19.10 Publishing 19.11 Dashboards Conclusion 20. It’s Dangerous To Go Alone! 20.1 Local Meetups 20.2 Conferences 20.3 The Carpentries 20.4 Podcasts 20.5 Other Resources Conclusion Part VI: Appendices A. Concept Maps B. Installation and Setup B.1 Install Python B.2 Install Python Packages B.3 Download Book Data C. Command Line C.1 Installation C.2 Basics D. Project Templates E. Using Python E.1 Command Line and Text Editor E.2 Python and IPython E.3 Jupyter E.4 Integrated Development Environments (IDEs) F. Working Directories G. Environments G.1 Conda Environments G.2 Pyenv + Pipenv H. Install Packages H.1 Updating Packages I. Importing Libraries J. Code Style J.1 Line Breaks in Code K. Containers: Lists, Tuples, and Dictionaries K.1 Lists K.2 Tuples K.3 Dictionaries L. Slice Values M. Loops N. Comprehensions O. Functions O.1 Default Parameters O.2 Arbitrary Parameters P. Ranges and Generators Q. Multiple Assignment R. Numpy ndarray S. Classes T. SettingWithCopyWarning T.1 Modifying a Subset of Data T.2 Replacing a Value T.3 More Resources U. Method Chaining V. Timing Code W. String Formatting W.1 C-Style W.2 String Formatting: .format() Method W.3 Formatting Numbers X. Conditionals (if-elif-else) Y. New York ACS Logistic Regression Example Z. Replicating Results in R Z.1 Linear Regression Z.2 Logistic Regression Z.3 Poisson Regression Index Code Snippets
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.