0%

Data science and machine learning two of the worlds hottest fields are attracting talent from a wide variety of technical, business, and liberal arts disciplines. Python, the worlds #1 programming language, is also the most popular language for data science and machine learning. This is the first guide specifically designed to help millions of people with widely diverse backgrounds learn Python so they can use it for data science and machine learning.

Leading data science instructor and practitioner Kennedy Behrman first walks through the process of learning to code for the first time with Python and Jupyter notebook, then introduces key libraries every Python data science programmer needs to master. Once youve learned these foundations, Behrman introduces intermediate and applied Python techniques for real-world problem-solving.

Throughout, Foundational Python for Data Science presents hands-on exercises, learning assessments, case studies, and more all created with colab (jupyter compatible) notebooks, so you can execute all coding examples interactively without installing or configuring any software.

Table of Contents

  1. Cover Page
  2. About This eBook
  3. Halftitle Page
  4. Title Page
  5. Copyright Page
  6. Dedication Page
  7. Contents at a Glance
  8. Contents
  9. Preface
  10. Figure Credits
  11. Register Your Book
  12. Acknowledgments
  13. About the Author
  14. I: Learning Python in a Notebook Environment
    1. 1 Introduction to Notebooks
    2. Running Python Statements
    3. Jupyter Notebooks
    4. Google Colab
    5. Summary
    6. Questions
    7. 2 Fundamentals of Python
    8. Basic Types in Python
    9. Performing Basic Math Operations
    10. Using Classes and Objects with Dot Notation
    11. Summary
    12. Questions
    13. 3 Sequences
    14. Shared Operations
    15. Lists and Tuples
    16. Strings
    17. Ranges
    18. Summary
    19. Questions
    20. 4 Other Data Structures
    21. Dictionaries
    22. Sets
    23. Frozensets
    24. Summary
    25. Questions
    26. 5 Execution Control
    27. Compound Statements
    28. if Statements
    29. while Loops
    30. for Loops
    31. break and continue Statements
    32. Summary
    33. Questions
    34. 6 Functions
    35. Defining Functions
    36. Scope in Functions
    37. Decorators
    38. Anonymous Functions
    39. Summary
    40. Questions
  15. II: Data Science Libraries
    1. 7 NumPy
    2. Installing and Importing NumPy
    3. Creating Arrays
    4. Indexing and Slicing
    5. Element-by-Element Operations
    6. Filtering Values
    7. Views Versus Copies
    8. Some Array Methods
    9. Broadcasting
    10. NumPy Math
    11. Summary
    12. Questions
    13. 8 SciPy
    14. SciPy Overview
    15. The scipy.misc Submodule
    16. The scipy.special Submodule
    17. The scipy.stats Submodule
    18. Summary
    19. Questions
    20. 9 Pandas
    21. About DataFrames
    22. Creating DataFrames
    23. Interacting with DataFrame Data
    24. Manipulating DataFrames
    25. Manipulating Data
    26. Interactive Display
    27. Summary
    28. Questions
    29. 10 Visualization Libraries
    30. matplotlib
    31. Seaborn
    32. Plotly
    33. Bokeh
    34. Other Visualization Libraries
    35. Summary
    36. Questions
    37. 11 Machine Learning Libraries
    38. Popular Machine Learning Libraries
    39. How Machine Learning Works
    40. Learning More About Scikit-learn
    41. Summary
    42. Questions
    43. 12 Natural Language Toolkit
    44. NLTK Sample Texts
    45. Frequency Distributions
    46. Text Objects
    47. Classifying Text
    48. Summary
    49. Exercises
  16. III: Intermediate Python
    1. 13 Functional Programming
    2. Introduction to Functional Programming
    3. List Comprehensions
    4. Generators
    5. Summary
    6. Questions
    7. 14 Object-Oriented Programming
    8. Grouping State and Function
    9. Special Methods
    10. Inheritance
    11. Summary
    12. Questions
    13. 15 Other Topics
    14. Sorting
    15. Reading and Writing Files
    16. datetime Objects
    17. Regular Expressions
    18. Summary
    19. Questions
  17. A Answers to End-of-Chapter Questions
  18. Index
  19. Code Snippets
54.160.133.33