Basics of Python Data Analysis PDF Chinese Super Clear Edition

foreword

Table of contents

insert image description here

Preface xi
Chapter 1 Python Basics 1
1.1 Creating Python Scripts 1
1.2 Running Python Scripts 3
1.3 Several Skills for Interacting with the Command Line 6
1.4 Python Language Basics 10
1.4.1 Numerical Values ​​10
1.4.2 Strings 12
1.4.3 Regular Expressions and Pattern Matching 16
1.4.4 Dates 19
1.4.5 Lists 21
1.4.6 Tuples 26
1.4.7 Dictionaries 27
1 .4.8 Control Flow 30
1.5 Reading Text Files 35
1.5.1 Creating Text Files 36
1.5.2 Script and Input Files in the Same Location 38
1.5.3 New Syntax for Reading Files 38
1 .6 Use glob to read multiple text files 39
1.7 Write text files 42
1.7.1 To first_script. py Add code 42
1.7.2 Write CSV file 45
1.8 print statement 46
1.9 Practice in this chapter 47
Chapter 2 CSV file 48
2.1 Basic Python and pandas 50
2.1.1 Read and write CSV file ( Part 1) 50
2.1.2 How Basic String Analysis Fails 56
2.1.3 Reading and writing CSV files (Part 2) 57
2.2 Filtering specific rows 58
2.2.1 The value in the row meets a certain condition 59
2.2.2 The value in the row belongs to a certain set 60
2.2.3 Values ​​in a row match a pattern/regular expression 62
2.3 Select specific columns 64
2.3.1 Column index values ​​64
2.3.2 Column headers 65
2.4 Select consecutive 67
2.5 Adding a Header Row 69
2.6 Reading Multiple CSV Files 71
2.7 Concatenating Data from Multiple Files 75
2.8 Computing the Sum and Mean of Values ​​in Each File 78
2.9 Exercises for this Chapter 81
Chapter 3 Excel Files 82
3.1 Introspecting Excel Workbooks 84
3.2 Working with Individual Worksheets 88
3.2.1 Reading and Writing Excel Files 88
3.2.2 Filtering Specific Rows 92
3.2.3 Selecting Specific Column 98
3.3 Read all worksheets in the workbook 101
3.3.1 Filter specific rows in all worksheets 102
3.3.2 Select specific columns in all worksheets 104
3.4 In Excel workbook Reading a set of worksheets in 106
3.5 Working with multiple workbooks 108
3.5.1 Counting worksheets and counting rows and columns in each worksheet 110
3.5.2 Joining data from multiple workbooks 111
3.5.3 Computing totals and means for each workbook and worksheet 113
3.6 Exercises for this chapter 117
Chapter 4 Databases 118
4.1 Python's built-in sqlite3 Module 119
4.1.1 Insert new records into a table 124
4.1.2 Update records in a table 128
4.2 MySQL database 131
4.2.1 Insert new records into a table 135
4.2.2 Query a table and write the output to a CSV file 140
4.2.3 Updating records in a
table 142 4.3 Exercises for this chapter 146
Chapter 5 Applications 147
5.1 Finding a set of items in a large collection of files 147
5.2 As a CSV file 158 Computing statistics for any number of categories of
data in a text file 158 5.3 Computing statistics for any number of categories of data in a text file 167
5.4 Exercises in this chapter 174
Chapter 6 Figures and charts 175
6.1 matplotlib 175
6.1.1 Item Bar graph 175
6.1.2 Histogram 177
6.1.3 Line graph 178
6.1.4 Scatter plot 180
6.1.5 Box plot 181
6.2 pandas 183
6.3 ggplot 184
6.4 seaborn 186
Chapter 7 Descriptive Statistics and Modeling 192
7.1 Datasets 192
7.1.1 Wine Quality 192
7.1.2 Customer Churn 193
7.2 Wine Quality 194
7.2.1 Descriptive Statistics 194
7.2 .2 Grouping, histogram and t test 195
7.2.3 Relationship and correlation between paired variables 196
7.2.4 Linear regression using least square estimation 198
7.2.5 Coefficient interpretation 200
7. 2.6 Independent Variable Standardization 200
7.2.7 Forecasting 202
7.3 Churn 203
7.3.1 Logistic Regression 205
7.3.2 Coefficient Interpretation 207
7.3.3 Forecasting 208
Chapter 8 On Plan Automatically run scripts 209
8.1 Task scheduler (Windows system) 209
8.2 cron tool (macOS system and Unix system) 215
8.2.1 cron table file: one-time setting 216
8.2.2 Add cron table file Add cron task in 216
Chapter 9 Start here 220
9.1 More standard library modules and built-in functions 221
9.1.1 Python standard library (PSL): more standard modules 221
9.1.2 Built-in function 222
9.2 The Python Package Index (PyPI): More Extension Modules 222
9.2.1 NumPy 223
9.2.2 SciPy 227
9.2.3 Scikit-Learn 230
9.2.4 More Extension Packages 232
9.3 More Data Structures 232
9.3.1 Stacks 233
9.3.2 Queues 233
9.3.3 Diagrams 233
9.3.4 Trees 234
9.4 Start Here 234
Appendix A Download Guide 236
Appendix B Exercise Answers 245
Author Introduction 247

Cover introduction 247

Data collection

This full version of the PDF data has been uploaded to the CSDN official website. If you need it, you can click the CSDN official certification WeChat card below to get it for free ↓↓↓【Guaranteed 100% free】

insert image description here

Guess you like

Origin blog.csdn.net/weixin_49895216/article/details/132508443