Job Ready Python

25,99 €*

Lieferzeit Sofort lieferbar

Job Ready Python, Wiley
Von Haythem Balti, Kimberly A. Weiss, im heise Shop in digitaler Fassung erhältlich
Format
(Hinweis: DRM-geschützt)
Anzahl:
Artikel-Beschreibung
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.

HAYTHEM BALTI, PHD, is the associate dean at Wiley’s mthree academy. He has created courses used by thousands of Software Guild and mthree alumni to learn Go, Java, Python, and other development and data science skills.

KIMBERLY A. WEISS is a veteran course developer, specializing in Computer Science courses since 2002. She was an assistant professor in Computer Science for over ten years before deciding to focus exclusively on course design. She has worked with multiple universities as well as corporate training settings to develop interactive instructional content appropriate for the target learners and course goals. About the Authors v

About the Technical Writer v

About the Technical Editor v

Acknowledgments vi

Introduction xvii

PART I: GETTING STARTED WITH PYTHON 1

LESSON 1: SETTING UP A PYTHON PROGRAMMING ENVIRONMENT 3

Python Overview 4

Using Replit Online 4

Getting Started with Jupyter Notebook 14

A Quick Look at Visual Studio Code 21

Using Python from the Command Line 24

Summary 26

Exercises 26

LESSON 2: UNDERSTANDING PROGRAMMING BASICS 29

The Future of Computer Programming 30

Programming Languages 32

Data Types and Variables 37

Variables 40

Constants 44

Summary 46

Exercises 46

LESSON 3: EXPLORING BASIC PYTHON SYNTAX 49

Using with Single- Line Commands 51

Using Semicolons 52

Continuing with Backslash 54

Working with Case Structure 55

Adding Comments 56

Using the Input Function 57

Storing Input 59

Understanding Variable Types 61

Displaying Variable Values 62

Naming Variables 64

Summary 65

Exercises 65

LESSON 4: WORKING WITH BASIC PYTHON DATA TYPES 69

Review of Data Types 70

Number Data Types 70

Identifying Data Types 72

Mathematical Operations 74

Pemdas 77

Common Math Functions 81

Math Library Functions 83

Using Numbers with User Input 86

Boolean Types and Boolean Operations 89

Logic Operations 92

Comparative Operators 95

Summary 96

Exercises 97

LESSON 5: USING PYTHON CONTROL STATEMENTS 101

Control Structures Review 101

Understanding Sequence Control Structure 102

Understanding Selection Statements 103

Understanding Conditional Statements 106

If- Else Statements 108

Working with Nested Conditions 109

Embedding Conditions 112

Summary 114

Exercises 114

LESSON 6: PULLING IT ALL TOGETHER: INCOME TAX CALCULATOR 117

Getting Started 118

Step 1: Gather Requirements 118

Step 2: Design the Program 120

Step 3: Create the Inputs 120

Step 4: Calculate the Taxable Income 122

Step 5: Calculate the Tax Rate 124

Step 6: Update the Application 133

Step 7: Address the UI 136

On Your Own 139

Summary 139

PART II: LOOPS AND DATA STRUCTURES 141

LESSON 7: CONTROLLING PROGRAM FLOW WITH LOOPS 143

Iterations Overview 144

The Anatomy of a Loop 144

The for Loop 145

The while Loop 146

for vs. while Loops 149

Strings and String Operations 151

Iterating through Strings 164

Summary 167

Exercises 167

LESSON 8: UNDERSTANDING BASIC DATA STRUCTURES: LISTS 173

Data Structure Overview—Part 1 174

Creating Lists 175

Determining List Length 179

Working with List Indexes 179

Negative Indexing in Lists 182

Slicing Lists 184

Adding Items to a List 189

Inserting List Items 190

Removing List Items 192

Concatenating Lists 196

List Comprehension 197

Sorting Lists 199

Copying Lists 200

Summary 202

Exercises 202

LESSON 9: UNDERSTANDING BASIC DATA STRUCTURES: TUPLES 205

Tuples and Tuple Operations 206

Tuple Index Values 209

Negative Indexing in Tuples 210

Slicing Tuples 212

Immutability 213

Concatenating Tuples 216

Searching Tuples 217

Summary 218

Exercises 219

LESSON 10: DIVING DEEPER INTO DATA STRUCTURES: DICTIONARIES 223

Data Structure Overview— Part 2 224

Getting Started with Dictionaries 224

Generating a Dictionary 227

Retrieving Items from a Dictionary 230

Using the keys() Method 233

Using the items() Method 234

Reviewing the keys(), values(), and items() Methods 236

Using the get() Method 239

Using the pop() Method 241

Working with the in Operator 245

Updating a Dictionary 246

Duplicating a Dictionary 249

Clearing a Dictionary 254

Summary 255

Exercises 255

LESSON 11: DIVING DEEPER INTO DATA STRUCTURES: SETS 259

Sets 260

Retrieving Items from a Set 261

Adding Items to a Set 262

Creating an Empty Set 262

Understanding Set Uniqueness 263

Searching Items in a Set 265

Calculating the Length of a Set 267

Deleting Items from a Set 268

Clearing a Set 270

Popping Items in a Set 272

Deleting a Set 273

Determining the Difference Between Sets 274

Intersecting Sets 277

Combining Sets 278

Summary 279

Exercises 279

LESSON 12: PULLING IT ALL TOGETHER: PROMPTING FOR AN ADDRESS 283

Step 1: Getting Started 284

Step 2: Accept User Input 285

Step 3: Display the Input Value 286

Step 4: Modify the Output 287

Step 5: Split a Text Value 288

Step 6: Display Only the House Number 290

Step 7: Display the Street Name 291

Step 8: Add the Period 292

Summary 293

LESSON 13: ORGANIZING WITH FUNCTIONS 295

Functions Overview 295

Defining Functions in Python 296

Function Syntax 300

Default Input Values 301

Parameter Syntax 303

Arbitrary Arguments 304

Keyword Arguments 306

Arbitrary Keyword Arguments 306

Summary 308

Exercises 309

PART III: OBJECT- ORIENTED PROGRAMMING IN PYTHON 311

LESSON 14: INCORPORATING OBJECT- ORIENTED PROGRAMMING 313

Object- Oriented Programming Overview 314

Defining Classes 314

Creating Objects 316

Working with Methods 319

Class Attributes 324

Summary 330

Exercises 330

LESSON 15: INCLUDING

Inheritance 333

Understanding Inheritance 334

Creating a Parent Class 335

Creating a Child Class 335

Inheriting at Multiple Levels 338

Overriding Methods 340

Summary 343

Exercises 344

LESSON 16: PULLING IT ALL TOGETHER: BUILDING A BURGER SHOP 349

Requirements for Our Application 350

Plan the Code 350

Create the Classes 351

Create the Food Item Class 352

Create the Main File 357

Display the Output 364

Tie the Code Files Together 364

Summary 368

PART IV: DATA PROCESSING WITH PYTHON 369

LESSON 17: WORKING WITH DATES AND TIMES 371

Getting Started with Dates and Times 372

Getting the Current Date and Time 376

Splitting a Date String 377

Using datetime Attributes 379

Creating Custom datetime Objects 380

Compare datetime Values 381

Working with UTC Format 383

Applying Timestamps 384

Arithmetic and Dates 387

Calculating the Difference in Days 388

Using Date without Time 390

Using Time without Date 392

Summary 394

Exercises 394

Calculator 1: Time Duration 396

Calculator 2: Add or Subtract Time from a Date 397

Calculator 3: Age Calculator 397

LESSON 18: PROCESSING TEXT FILES 399

File Processing Overview 401

Introduction to File Input/Output 402

Processing Text Files 404

Opening a File 404

Reading Text from a File 406

Add Content to a File 412

Overwriting the Contents of a File 415

Creating a New File 417

Using the os Module 418

Deleting a File 419

Summary 421

Exercises 421

LESSON 19: PROCESSING CSV FILES 425

Reading CSV Files 426

Using the DictReader Class 430

Creating a Dataset List 432

Using writerow() 434

Appending Data 436

Writing Rows as Lists 439

Writing Rows from Dictionaries 440

Summary 444

Exercises 444

LESSON 20: PROCESSING JSON FILES 447

Processing JSON Files 448

Creating a JSON File with dump() 448

Converting to JSON with dumps() 449

Formatting JSON Data 450

Using json.loads() 452

Iterating through JSON Data 454

Reading and Writing JSON Data 457

Summary 460

Exercises 461

PART V: DATA ANALYSIS AND EXCEPTION HANDLING 465

LESSON 21: USING LAMBDAS 467

Creating a Lambda Function 468

Working with Multiple Inputs 469

Placing Lambda Functions inside a Function 471

Using the map() Function 472

Combining Map and Lambda Functions 475

Using the filter() Function 477

Combining a Filter and a Lambda 479

Using the reduce() Function 480

Summary 486

Exercises 486

LESSON 22: HANDLING EXCEPTIONS 491

Built- In Exceptions 492

Working with try and except 493

Working with Multiple Excepts 495

Combining Exception Types 498

Using Multiple Operations in a try 500

Using the raise Keyword 501

Exploring the General Exception Classes 502

Adding finally 505

Summary 506

Exercises 506

LESSON 23: PULLING IT ALL TOGETHER: WORD ANALYSIS IN PYTHON 511

Examine the Data 512

Read the Data 514

Tokenize the Dataset 517

Count the Words in Each Review 524

Summary 528

LESSON 24: EXTRACTING, TRANSFORMING, AND LOADING WITH ETL SCRIPTING 531

ETL Scripting in Python 532

Design and Implement Custom ETL Scripts 532

The extract Class 534

The transform Class 546

The load Class 569

Summary 582

Exercises 582

LESSON 25: IMPROVING ETL SCRIPTING 585

Converting to Static Methods for the extract Class 586

Converting to Static Methods for the transform Class 588

Summary 607

Exercises 608

PART VI: APPENDICES 611

APPENDIX A: FLOWCHARTS 613

Flowchart Basics 613

Common Flowcharting Shapes 615

APPENDIX B: CREATING PSEUDOCODE 621

What Is Pseudocode? 621

APPENDIX C: INSTALLING MYSQL 623

MySQL Installation 623

Verify the Installation 628

The MySQL Notifier 630

APPENDIX D: INSTALLING VINYL DB 631

Database Structure 631

Create the Database 632

APPENDIX E: INSTALLING MONGODB 637

Installing MongoDB Community Server 637

Running MongoDB 642

APPENDIX F: IMPORTING TO MONGODB 643

Index 645
Artikel-Details
Anbieter:
Wiley
Autor:
Haythem Balti, Kimberly A. Weiss
Artikelnummer:
9781119817390
Veröffentlicht:
12.10.2021
Seitenanzahl:
688