Job Ready Python

Book description

Get ready to take on Python with a practical and job-focused guide 

Job Ready Python offers readers a straightforward and elegant approach to learning Python that emphasizes hands-on and employable skills you can apply to real-world environments immediately. 

Based on the renowned mthree Global Academy and Software Guild training program, this book will get you up to speed in the basics of Python, loops and data structures, object-oriented programming, and data processing. You’ll also get: 

  • Thorough discussions of Extract, Transform, and Load (ETL) scripting in Python 
  • Explorations of databases, including MySQL, and MongoDB—all commonly used database platforms in the field 
  • Simple, step-by-step approaches to dealing with dates and times, CSV files, and JSON files 

Ideal for Python newbies looking to make a transition to an exciting new career, Job Ready Python also belongs on the bookshelves of Python developers hoping to brush up on the fundamentals with an authoritative and practical new handbook.  

Table of contents

  1. Cover
  2. Title Page
  3. Introduction
    1. WHAT DOES THIS BOOK COVER?
    2. READER SUPPORT FOR THIS BOOK
  4. PART I: Getting Started with Python
    1. Lesson 1: Setting Up a Python Programming Environment
      1. PYTHON OVERVIEW
      2. USING REPLIT ONLINE
      3. GETTING STARTED WITH JUPYTER NOTEBOOK
      4. A QUICK LOOK AT VISUAL STUDIO CODE
      5. USING PYTHON FROM THE COMMAND LINE
      6. SUMMARY
      7. EXERCISES
    2. Lesson 2: Understanding Programming Basics
      1. THE FUTURE OF COMPUTER PROGRAMMING
      2. PROGRAMMING LANGUAGES
      3. DATA TYPES AND VARIABLES
      4. SUMMARY
      5. EXERCISES
    3. Lesson 3: Exploring Basic Python Syntax
      1. USING WITH SINGLE-LINE COMMANDS
      2. USING SEMICOLONS
      3. CONTINUING WITH BACKSLASH
      4. WORKING WITH CASE STRUCTURE
      5. ADDING COMMENTS
      6. USING THE INPUT FUNCTION
      7. STORING INPUT
      8. UNDERSTANDING VARIABLE TYPES
      9. DISPLAYING VARIABLE VALUES
      10. NAMING VARIABLES
      11. SUMMARY
      12. EXERCISES
    4. Lesson 4: Working with Basic Python Data Types
      1. REVIEW OF DATA TYPES
      2. NUMBER DATA TYPES
      3. IDENTIFYING DATA TYPES
      4. MATHEMATICAL OPERATIONS
      5. PEMDAS
      6. COMMON MATH FUNCTIONS
      7. MATH LIBRARY FUNCTIONS
      8. USING NUMBERS WITH USER INPUT
      9. BOOLEAN TYPES AND BOOLEAN OPERATIONS
      10. LOGIC OPERATIONS
      11. COMPARATIVE OPERATORS
      12. SUMMARY
      13. EXERCISES
    5. Lesson 5: Using Python Control Statements
      1. CONTROL STRUCTURES REVIEW
      2. UNDERSTANDING SEQUENCE CONTROL STRUCTURE
      3. UNDERSTANDING SELECTION STATEMENTS
      4. UNDERSTANDING CONDITIONAL STATEMENTS
      5. IF-ELSE STATEMENTS
      6. WORKING WITH NESTED CONDITIONS
      7. EMBEDDING CONDITIONS
      8. SUMMARY
      9. EXERCISES
    6. Lesson 6: Pulling It All Together: Income Tax Calculator
      1. GETTING STARTED
      2. STEP 1: GATHER REQUIREMENTS
      3. STEP 2: DESIGN THE PROGRAM
      4. STEP 3: CREATE THE INPUTS
      5. STEP 4: CALCULATE THE TAXABLE INCOME
      6. STEP 5: CALCULATE THE TAX RATE
      7. STEP 6: UPDATE THE APPLICATION
      8. STEP 7: ADDRESS THE UI
      9. ON YOUR OWN
      10. SUMMARY
  5. PART II: Loops and Data Structures
    1. Lesson 7: Controlling Program Flow with Loops
      1. ITERATIONS OVERVIEW
      2. THE ANATOMY OF A LOOP
      3. THE FOR LOOP
      4. THE WHILE LOOP
      5. FOR VS. WHILE LOOPS
      6. STRINGS AND STRING OPERATIONS
      7. ITERATING THROUGH STRINGS
      8. SUMMARY
      9. EXERCISES
    2. Lesson 8: Understanding Basic Data Structures: Lists
      1. DATA STRUCTURE OVERVIEW—PART 1
      2. CREATING LISTS
      3. DETERMINING LIST LENGTH
      4. WORKING WITH LIST INDEXES
      5. NEGATIVE INDEXING IN LISTS
      6. SLICING LISTS
      7. ADDING ITEMS TO A LIST
      8. INSERTING LIST ITEMS
      9. REMOVING LIST ITEMS
      10. CONCATENATING LISTS
      11. LIST COMPREHENSION
      12. SORTING LISTS
      13. COPYING LISTS
      14. SUMMARY
      15. EXERCISES
    3. Lesson 9: Understanding Basic Data Structures: Tuples
      1. TUPLES AND TUPLE OPERATIONS
      2. TUPLE INDEX VALUES
      3. NEGATIVE INDEXING IN TUPLES
      4. SLICING TUPLES
      5. IMMUTABILITY
      6. CONCATENATING TUPLES
      7. SEARCHING TUPLES
      8. SUMMARY
      9. EXERCISES
    4. Lesson 10: Diving Deeper into Data Structures: Dictionaries
      1. DATA STRUCTURE OVERVIEW—PART 2
      2. GETTING STARTED WITH DICTIONARIES
      3. GENERATING A DICTIONARY
      4. RETRIEVING ITEMS FROM A DICTIONARY
      5. USING THE KEYS() METHOD
      6. USING THE ITEMS() METHOD
      7. REVIEWING THE KEYS(), VALUES(), AND ITEMS() METHODS
      8. USING THE GET() METHOD
      9. USING THE POP() METHOD
      10. WORKING WITH THE IN OPERATOR
      11. UPDATING A DICTIONARY
      12. DUPLICATING A DICTIONARY
      13. CLEARING A DICTIONARY
      14. SUMMARY
      15. EXERCISES
    5. Lesson 11: Diving Deeper into Data Structures: Sets
      1. SETS
      2. RETRIEVING ITEMS FROM A SET
      3. ADDING ITEMS TO A SET
      4. CREATING AN EMPTY SET
      5. UNDERSTANDING SET UNIQUENESS
      6. SEARCHING ITEMS IN A SET
      7. CALCULATING THE LENGTH OF A SET
      8. DELETING ITEMS FROM A SET
      9. CLEARING A SET
      10. POPPING ITEMS IN A SET
      11. DELETING A SET
      12. DETERMINING THE DIFFERENCE BETWEEN SETS
      13. INTERSECTING SETS
      14. COMBINING SETS
      15. SUMMARY
      16. EXERCISES
    6. Lesson 12: Pulling It All Together: Prompting for an Address
      1. STEP 1: GETTING STARTED
      2. STEP 2: ACCEPT USER INPUT
      3. STEP 3: DISPLAY THE INPUT VALUE
      4. STEP 4: MODIFY THE OUTPUT
      5. STEP 5: SPLIT A TEXT VALUE
      6. STEP 6: DISPLAY ONLY THE HOUSE NUMBER
      7. STEP 7: DISPLAY THE STREET NAME
      8. STEP 8: ADD THE PERIOD
      9. SUMMARY
    7. Lesson 13: Organizing with Functions
      1. FUNCTIONS OVERVIEW
      2. DEFINING FUNCTIONS IN PYTHON
      3. FUNCTION SYNTAX
      4. DEFAULT INPUT VALUES
      5. PARAMETER SYNTAX
      6. ARBITRARY ARGUMENTS
      7. KEYWORD ARGUMENTS
      8. ARBITRARY KEYWORD ARGUMENTS
      9. SUMMARY
      10. EXERCISES
  6. PART III: Object-Oriented Programming in Python
    1. Lesson 14: Incorporating Object-Oriented Programming
      1. OBJECT-ORIENTED PROGRAMMING OVERVIEW
      2. DEFINING CLASSES
      3. CREATING OBJECTS
      4. WORKING WITH METHODS
      5. CLASS ATTRIBUTES
      6. SUMMARY
      7. EXERCISES
    2. Lesson 15: Including Inheritance
      1. UNDERSTANDING INHERITANCE
      2. CREATING A PARENT CLASS
      3. CREATING A CHILD CLASS
      4. INHERITING AT MULTIPLE LEVELS
      5. OVERRIDING METHODS
      6. SUMMARY
      7. EXERCISES
    3. Lesson 16: Pulling It All Together: Building a Burger Shop
      1. REQUIREMENTS FOR OUR APPLICATION
      2. PLAN THE CODE
      3. CREATE THE CLASSES
      4. CREATE THE FOOD ITEM CLASS
      5. CREATE THE MAIN FILE
      6. DISPLAY THE OUTPUT
      7. TIE THE CODE FILES TOGETHER
      8. SUMMARY
  7. PART IV: Data Processing with Python
    1. Lesson 17: Working with Dates and Times
      1. GETTING STARTED WITH DATES AND TIMES
      2. GETTING THE CURRENT DATE AND TIME
      3. SPLITTING A DATE STRING
      4. USING DATETIME ATTRIBUTES
      5. CREATING CUSTOM DATETIME OBJECTS
      6. COMPARE DATETIME VALUES
      7. WORKING WITH UTC FORMAT
      8. APPLYING TIMESTAMPS
      9. ARITHMETIC AND DATES
      10. CALCULATING THE DIFFERENCE IN DAYS
      11. USING DATE WITHOUT TIME
      12. USING TIME WITHOUT DATE
      13. SUMMARY
      14. EXERCISES
    2. Lesson 18: Processing Text Files
      1. FILE PROCESSING OVERVIEW
      2. INTRODUCTION TO FILE INPUT/OUTPUT
      3. PROCESSING TEXT FILES
      4. OPENING A FILE
      5. READING TEXT FROM A FILE
      6. ADD CONTENT TO A FILE
      7. OVERWRITING THE CONTENTS OF A FILE
      8. CREATING A NEW FILE
      9. USING THE OS MODULE
      10. DELETING A FILE
      11. SUMMARY
      12. EXERCISES
    3. Lesson 19: Processing CSV Files
      1. READING CSV FILES
      2. USING THE DICTREADER CLASS
      3. CREATING A DATASET LIST
      4. USING WRITEROW()
      5. APPENDING DATA
      6. WRITING ROWS AS LISTS
      7. WRITING ROWS FROM DICTIONARIES
      8. SUMMARY
      9. EXERCISES
    4. Lesson 20: Processing JSON Files
      1. PROCESSING JSON FILES
      2. CREATING A JSON FILE WITH DUMP()
      3. CONVERTING TO JSON WITH DUMPS()
      4. FORMATTING JSON DATA
      5. USING JSON.LOADS()
      6. ITERATING THROUGH JSON DATA
      7. READING AND WRITING JSON DATA
      8. SUMMARY
      9. EXERCISES
  8. PART V: Data Analysis and Exception Handling
    1. Lesson 21: Using Lambdas
      1. CREATING A LAMBDA FUNCTION
      2. WORKING WITH MULTIPLE INPUTS
      3. PLACING LAMBDA FUNCTIONS INSIDE A FUNCTION
      4. USING THE MAP() FUNCTION
      5. COMBINING MAP AND LAMBDA FUNCTIONS
      6. USING THE FILTER() FUNCTION
      7. COMBINING A FILTER AND A LAMBDA
      8. USING THE REDUCE() FUNCTION
      9. SUMMARY
      10. EXERCISES
    2. Lesson 22: Handling Exceptions
      1. BUILT-IN EXCEPTIONS
      2. WORKING WITH TRY AND EXCEPT
      3. WORKING WITH MULTIPLE EXCEPTS
      4. COMBINING EXCEPTION TYPES
      5. USING MULTIPLE OPERATIONS IN A TRY
      6. USING THE RAISE KEYWORD
      7. EXPLORING THE GENERAL EXCEPTION CLASSES
      8. ADDING FINALLY
      9. SUMMARY
      10. EXERCISES
    3. Lesson 23: Pulling It All Together: Word Analysis in Python
      1. EXAMINE THE DATA
      2. READ THE DATA
      3. TOKENIZE THE DATASET
      4. COUNT THE WORDS IN EACH REVIEW
      5. SUMMARY
    4. Lesson 24: Extracting, Transforming, and Loading with ETL Scripting
      1. ETL SCRIPTING IN PYTHON
      2. DESIGN AND IMPLEMENT CUSTOM ETL SCRIPTS
      3. THE EXTRACT CLASS
      4. THE TRANSFORM CLASS
      5. THE LOAD CLASS
      6. SUMMARY
      7. EXERCISES
    5. Lesson 25: Improving ETL Scripting
      1. CONVERTING TO STATIC METHODS FOR THE EXTRACT CLASS
      2. CONVERTING TO STATIC METHODS FOR THE TRANSFORM CLASS
      3. SUMMARY
      4. EXERCISES
  9. PART VI: Appendices
    1. Appendix A: Flowcharts
      1. FLOWCHART BASICS
      2. COMMON FLOWCHARTING SHAPES
    2. Appendix B: Creating Pseudocode
      1. WHAT IS PSEUDOCODE?
    3. Appendix C: Installing MySQL
      1. MySQL INSTALLATION
      2. VERIFY THE INSTALLATION
      3. THE MySQL NOTIFIER
    4. Appendix D: Installing Vinyl DB
      1. DATABASE STRUCTURE
      2. CREATE THE DATABASE
    5. Appendix E: Installing MongoDB
      1. INSTALLING MongoDB COMMUNITY SERVER
      2. RUNNING MongoDB
    6. Appendix F: Importing to MongoDB
  10. Index
  11. Copyright
  12. About the Authors
    1. About the Technical Writer
    2. About the Technical Editor
  13. Acknowledgments
  14. End User License Agreement

Product information

  • Title: Job Ready Python
  • Author(s): Haythem Balti, Kimberly A. Weiss
  • Release date: November 2021
  • Publisher(s): Wiley
  • ISBN: 9781119817383