You are previewing Data Science Essentials in Python.
O'Reilly logo
Data Science Essentials in Python

Book Description

Go from messy, unstructured artifacts stored in SQL and NoSQL databases to a neat, well-organized dataset with this quick reference for the busy data scientist. Understand text mining, machine learning, and network analysis; process numeric data with the NumPy and Pandas modules; describe and analyze data using statistical and network-theoretical methods; and see actual examples of data analysis at work. This one-stop solution covers the essential data science you need in Python.

Table of Contents

  1. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">&#160;</span>AcknowledgmentsAcknowledgments
  2. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">&#160;</span>PrefacePreface
    1. About This Book
    2. About the Audience
    3. About the Software
    4. Notes on Quotes
    5. The Book Forum
    6. Your Turn
  3. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">1. </span>What Is Data Science?What Is Data Science?
    1. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 1. </span>Data Analysis SequenceData Analysis Sequence
    2. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 2. </span>Data Acquisition PipelineData Acquisition Pipeline
    3. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 3. </span>Report StructureReport Structure
    4. Your Turn
  4. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">2. </span>Core Python for Data ScienceCore Python for Data Science
    1. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 4. </span>Understanding Basic String FunctionsUnderstanding Basic String Functions
    2. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 5. </span>Choosing the Right Data StructureChoosing the Right Data Structure
    3. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 6. </span>Comprehending Lists Through List ComprehensionComprehending Lists Through List Comprehension
    4. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 7. </span>Counting with CountersCounting with Counters
    5. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 8. </span>Working with FilesWorking with Files
    6. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 9. </span>Reaching the WebReaching the Web
    7. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 10. </span>Pattern Matching with Regular ExpressionsPattern Matching with Regular Expressions
    8. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 11. </span>Globbing File Names and Other StringsGlobbing File Names and Other Strings
    9. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 12. </span>Pickling and Unpickling DataPickling and Unpickling Data
    10. Your Turn
  5. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">3. </span>Working with Text DataWorking with Text Data
    1. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 13. </span>Processing HTML FilesProcessing HTML Files
    2. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 14. </span>Handling CSV FilesHandling CSV Files
    3. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 15. </span>Reading JSON FilesReading JSON Files
    4. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 16. </span>Processing Texts in Natural LanguagesProcessing Texts in Natural Languages
    5. Your Turn
  6. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">4. </span>Working with DatabasesWorking with Databases
    1. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 17. </span>Setting Up a MySQL DatabaseSetting Up a MySQL Database
    2. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 18. </span>Using a MySQL Database: Command LineUsing a MySQL Database: Command Line
    3. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 19. </span>Using a MySQL Database: pymysqlUsing a MySQL Database: pymysql
    4. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 20. </span>Taming Document Stores: MongoDBTaming Document Stores: MongoDB
    5. Your Turn
  7. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">5. </span>Working with Tabular Numeric DataWorking with Tabular Numeric Data
    1. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 21. </span>Creating ArraysCreating Arrays
    2. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 22. </span>Transposing and ReshapingTransposing and Reshaping
    3. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 23. </span>Indexing and SlicingIndexing and Slicing
    4. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 24. </span>BroadcastingBroadcasting
    5. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 25. </span>Demystifying Universal FunctionsDemystifying Universal Functions
    6. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 26. </span>Understanding Conditional FunctionsUnderstanding Conditional Functions
    7. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 27. </span>Aggregating and Ordering ArraysAggregating and Ordering Arrays
    8. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 28. </span>Treating Arrays as SetsTreating Arrays as Sets
    9. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 29. </span>Saving and Reading ArraysSaving and Reading Arrays
    10. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 30. </span>Generating a Synthetic Sine WaveGenerating a Synthetic Sine Wave
    11. Your Turn
  8. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">6. </span>Working with Data Series and FramesWorking with Data Series and Frames
    1. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 31. </span>Getting Used to Pandas Data StructuresGetting Used to Pandas Data Structures
    2. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 32. </span>Reshaping DataReshaping Data
    3. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 33. </span>Handling Missing DataHandling Missing Data
    4. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 34. </span>Combining DataCombining Data
    5. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 35. </span>Ordering and Describing DataOrdering and Describing Data
    6. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 36. </span>Transforming DataTransforming Data
    7. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 37. </span>Taming Pandas File I/OTaming Pandas File I/O
    8. Your Turn
  9. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">7. </span>Working with Network DataWorking with Network Data
    1. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 38. </span>Dissecting GraphsDissecting Graphs
    2. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 39. </span>Network Analysis SequenceNetwork Analysis Sequence
    3. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 40. </span>Harnessing NetworkxHarnessing Networkx
    4. Your Turn
  10. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">8. </span>PlottingPlotting
    1. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 41. </span>Basic Plotting with PyPlotBasic Plotting with PyPlot
    2. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 42. </span>Getting to Know Other Plot TypesGetting to Know Other Plot Types
    3. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 43. </span>Mastering EmbellishmentsMastering Embellishments
    4. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 44. </span>Plotting with PandasPlotting with Pandas
    5. Your Turn
  11. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">9. </span>Probability and StatisticsProbability and Statistics
    1. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 45. </span>Reviewing Probability DistributionsReviewing Probability Distributions
    2. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 46. </span>Recollecting Statistical MeasuresRecollecting Statistical Measures
    3. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 47. </span>Doing Stats the Python WayDoing Stats the Python Way
    4. Your Turn
  12. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">10. </span>Machine LearningMachine Learning
    1. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 48. </span>Designing a Predictive ExperimentDesigning a Predictive Experiment
    2. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 49. </span>Fitting a Linear RegressionFitting a Linear Regression
    3. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 50. </span>Grouping Data with K-Means ClusteringGrouping Data with K-Means Clustering
    4. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">Unit 51. </span>Surviving in Random Decision ForestsSurviving in Random Decision Forests
    5. Your Turn
  13. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">A1. </span>Further ReadingFurther Reading
  14. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">A2. </span>Solutions to Single-Star ProjectsSolutions to Single-Star Projects
  15. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">&#160;</span>BibliographyBibliography