Principles of Data Science with Python: Introduction to Scientific Computing, Data Analysis, and Data Visualization
Order at Amazon: https://www.amazon.com/dp/1735241008
In this book, readers learn about:
- Programming with the Python language
- Data science, analysis, and visualization with the Python language
- Data structure in Python
- NumPy library and NumPy arrays
- Statistical functions
- Pandas library and Pandas DataFrames
- Time-series in Python
- Matplotlib library and data visualization
- SciPy library
- Interpolation, curve fitting, root finding, and numerical integration
- Signal processing and digital filtering
- Reading and writing data files
- Chapter 1 Set Up Python 1
- 1.1 Introduction to Python Language 21.2 Install Python Directly 21.3 Install Python Using Python Distribution 31.4 Python IDE 41.5 IPython and Jupyter Notebook 51.6 Python Libraries and Packages 51.7 Run Python Script 6
- Chapter 2 Introduction to Python Programming 11
- 2.1 Python Syntax Style 122.2 Python Built-in Functions, Standard Libraries, and Third-Party Libraries 132.3 Import Library 142.4 Mathematical Operators 162.5 Comparison Operators 182.6 Boolean Operators 192.7 Bitwise Operators 192.8 Integer and Floating Point 202.9 Complex Numbers 222.10 Strings 232.11 The range() Function 322.12 The if Statement 342.13 The for Statement 402.14 The while Statement 442.15 Define Function 462.16 The args and kwargs 532.17 Define Anonymous Function by Lambda Expression 552.18 Underscore ( _ ) 572.19 Work with File and Directory 59
- Chapter 3 Introduction to Python List, Tuple, and Dictionary 61
- 3.1 Python Data Structures 623.2 List 633.3 Nested List 643.4 Tuple 653.5 Nested Tuple 663.6 Dictionary 673.7 List Indexing 693.8 List Slicing 733.9 Change Item Contents in List 75
- Chapter 4 Working with Python List 77
- 4.1 Copy List 784.2 Append, Insert, and Delete List Items 794.3 Concatenate Lists 824.4 The len() Function 834.5 Sort List 844.6 The zip() Function 864.7 The enumerate() Function 884.8 List Comprehension 894.9 Generator Expression 924.10 The map() Function 944.11 List Initialization 974.12 Element-Wise Operation with for Statement 994.13 Element-Wise Operation with List Comprehension 1014.14 Element-Wise Operation with map() Function 102
- Chapter 5 Introduction to NumPy Library 105
- 5.1 NumPy Library 1065.2 Install NumPy Library 1065.3 Import NumPy Library 1075.4 Vector, Matrix, Array, and Tensor 1085.5 Create NumPy Array 1095.6 Array Data Type 1115.7 Array Attributes and Methods 1135.8 Array Dimension 1165.9 Array Indexing 1195.10 Array Slicing 1215.11 Indexing by Index List and Index Array 1265.12 Boolean Indexing (Mask) 1285.13 Change Element Contents in Array 1315.14 NumPy Structured Array 132
- Chapter 6 Working with NumPy Array 137
- 6.1 Import NumPy Library 1386.2 NumPy Functions, Array Attributes, and Array Methods 1386.3 Copy Array 1406.4 Append, Insert, and Delete Array Elements 1426.5 Obtain Array Shape and Size 1456.6 Reshape Array 1496.7 Flip Array 1516.8 Add New Dimension to Array 1536.9 Concatenate and Stack Arrays 1566.10 Array Initialization 1616.11 Element-Wise Operation and Comparison 1636.12 Find Indexes 1656.13 NaN and Inf 1696.14 Generate Sequence of Numbers 170
- Chapter 7 Basic Statistics with NumPy Library 175
- 7.1 Import NumPy Library 1767.2 NumPy Array Axis 1767.3 Statistical Functions 1777.4 Sum and Mean of Array 1787.5 Minimum and Maximum of Array 1807.6 Sort Array 1837.7 Random Number 1877.8 Generate Reproducible Random Number 1907.9 Random Number (Legacy Random Generator) 1917.10 Generate Reproducible Random Number (Legacy Random Generator) 1937.11 Histogram and Probability Density Function of Dataset 195
- Chapter 8 Introduction to Pandas Library 199
- 8.1 Pandas Library 2008.2 Install Pandas Library 2008.3 Import Pandas Library 2018.4 Create Pandas Series 2028.5 Create Pandas DataFrame 2048.6 Series and DataFrame Attributes and Methods 2078.7 Series and DataFrame Indexing and Slicing 2108.8 Multi Level Indexing 2158.9 Change Item Contents in Series and DataFrame 219
- Chapter 9 Working with Pandas Series and DataFrame 223
- 9.1 Import Pandas Library 2249.2 Pandas Functions, Attributes, and Methods 2249.3 Copy Series and DataFrame 2269.4 Append, Insert, and Delete Single Row or Single Column 2279.5 Append, Insert, and Delete Multiple Rows or Multiple Columns 2319.6 Concatenate Series and DataFrames 2359.7 Merge and Join Series and DataFrames 2389.8 Reindex Data 2459.9 Shift Data 2469.10 Arithmetic and Element-Wise Operation 2489.11 Apply Function 2509.12 Group Data 2539.13 Clean and Fill Missing Data 2609.14 Rolling Window 265
- Chapter 10 Date, Time, and Time-Series 273
- 10.1 Import Libraries 27410.2 Date and Time in Python 27410.3 Date and Time in NumPy 27910.4 Date and Time in Pandas 28210.5 Generate Time-Series with Python and NumPy 28410.6 Generate Date and Time Indexes in Pandas 28810.7 Generate Time-Series with Pandas 29010.8 Indexing and Slicing Pandas Time-Series 29310.9 Shift Data in Pandas Time-Series 29610.10 Clean and Fill Missing Data in Pandas Time-Series 29910.11 Resampling Pandas Time-Series 303
- Chapter 11 Introduction to Data Visualization with Matplotlib Library 313
- 11.1 Matplotlib Library 31411.2 Install Matplotlib Library 31411.3 Import Matplotlib Library 31511.4 The Pyplot Module 31611.5 Line Plot 31811.6 Set Color 32111.7 Set Line Style and Line Width 32411.8 Add Marker 32711.9 Add Labels 32911.10 Set Axis Limits, Ticks, and Scale 33111.11 Add Grid Lines 33411.12 Add Text and Annotation 33611.13 Add Mathematical Text 33911.14 Plot Multiple Lines and Add Legend 34211.15 Create Multiple Figures 34611.16 Customize Matplotlib Style 34711.17 Seaborn Library 351
- Chapter 12 Advanced Data Visualization with Matplotlib Library 355
- 12.1 Import Matplotlib Library 35612.2 Colormaps 35612.3 Extract Colors from Colormap 35912.4 Create Colormap 36112.5 Scatter Plot 36312.6 Contour and Image Plot 36712.7 Bar Plot 37012.8 Histogram Plot 37212.9 Axes 37512.10 Create Subplots 37912.11 Create Unequal Subplots 38312.12 Procedural and Object-Oriented Interfaces 38612.13 Time-Series Plot 39012.14 The 3-Dimensional Plot 39312.15 Map Plot 39612.16 Data Visualization with Pandas 401
- Chapter 13 Interpolation, Curve Fitting, Root Finding, and Numerical Integration with SciPy Library 405
- 13.1 SciPy Library 40613.2 Install SciPy Library 40613.3 Import SciPy Library 40713.4 Generate 1-Dimensional Grid Coordinates 40813.5 Generate 2-Dimensional Grid Coordinates 40913.6 The 1-Dimensional Interpolation 41213.7 The 2-Dimensional Interpolation 41513.8 Curve Fitting 42013.9 Curve Fitting by Optimization 42313.10 Root Finding 42613.11 Solve System of Linear Equations 42913.12 Numerical Integration 431
- Chapter 14 Introduction to Signal Processing 433
- 14.1 Import SciPy Library 43414.2 Wave Function 43414.3 Sampling Frequency 43614.4 Control Data Quality 43914.5 Detrend Data 44314.6 Time and Frequency Domains 44514.7 Fourier Analysis 44714.8 Fast Fourier Transform 44814.9 Frequency Ordering of Fast Fourier Transform 44914.10 Double-Sided FFT and Single-Sided FFT 45214.11 Wave Amplitudes from FFT 45614.12 Estimate Power Spectral Density from FFT 45914.13 Estimate Power Spectral Density from Periodogram and Welch Method 463
- Chapter 15 Basics of Window Function and Digital Filter 469
- 15.1 Import SciPy Library 47015.2 Convolution 47015.3 Window Function 47115.4 Digital Filter 47515.5 Digital Filter Band-Forms 47815.6 Basic Low-Pass FIR Filter 47915.7 Basic High-Pass, Band-Pass and Band-Stop FIR Filters 48315.8 Design Basic FIR Filters with SciPy Library 48515.9 Smooth Data by Moving Average 48815.10 Smooth Data by Savitzky-Golay Filter 49315.11 Smooth Data by Butterworth Filter 49615.12 Filter Out Frequency Range from Data 499
- Chapter 16 Read and Write Data Files 507
- 16.1 Import Libraries 50816.2 Read Text and ASCII Files with Python 50816.3 Read CSV Files with Python 51216.4 Read Text, ASCII, and CSV Files with NumPy 51416.5 Read Text, ASCII, and CSV Files with Pandas 51516.6 Save and Load Data Files 517
References 521
Index 523
CC BY-NC-SA 4.0 License
Principles of Data Science with Python: Introduction to Scientific Computing, Data Analysis, and Data Visualization
Copyright (c) 2022 Arash Karimpour
All rights reserved
Principles of Data Science with Python: Introduction to Scientific Computing, Data Analysis, and Data Visualization © 2020 by Arash Karimpour is licensed under CC BY-NC-SA 4.0 (https://creativecommons.org/licenses/by-nc-sa/4.0/)