Python All-in-One for Dummies (For Dummies (Computer/tech))

個数:
電子版価格 ¥2,928
  • 電書あり

Python All-in-One for Dummies (For Dummies (Computer/tech))

  • 提携先の海外書籍取次会社に在庫がございます。通常2週間で発送いたします。
    重要ご説明事項
    1. 納期遅延や、ご入手不能となる場合が若干ございます。
    2. 複数冊ご注文の場合、分割発送となる場合がございます。
    3. 美品のご指定は承りかねます。

  • 提携先の海外書籍取次会社に在庫がございます。通常約2週間で発送いたします。
    重要ご説明事項
    1. 納期遅延や、ご入手不能となる場合が若干ございます。
    2. 複数冊ご注文の場合、分割発送となる場合がございます。
    3. 美品のご指定は承りかねます。
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 683 p.
  • 言語 ENG,ENG
  • 商品コード 9781119557593
  • DDC分類 005.133

Full Description


Your one-stop resource on all things PythonThanks to its flexibility, Python has grown to become one of the most popular programming languages in the world. Developers use Python in app development, web development, data science, machine learning, and even in coding education classes.There's almost no type of project that Python can't make better. From creating apps to building complex websites to sorting big data, Python provides a way to get the work done. Python All-in-One For Dummies offers a starting point for those new to coding by explaining the basics of Python and demonstrating how it's used in a variety of applications.Covers the basics of the languageExplains its syntax through application in high-profile industriesShows how Python can be applied to projects in enterpriseDelves into major undertakings including artificial intelligence, physical computing, machine learning, robotics and data analysisThis book is perfect for anyone new to coding as well as experienced coders interested in adding Python to their toolbox.

Table of Contents

Introduction                                       1  (4)
About This Book 1 (1)
Foolish Assumptions 2 (1)
Icons Used in This Book 2 (1)
Beyond the Book 3 (1)
Where to Go from Here 3 (2)
Book 1 Getting Started With Python 5 (78)
Chapter 1 Starting with Python 7 (20)
Why Python Is Hot 8 (1)
Choosing the Right Python 9 (2)
Tools for Success 11 (6)
An excellent, free learning environment 12 (1)
Installing Anaconda and VS Code 13 (4)
Writing Python in VS Code 17 (4)
Choosing your Python interpreter 19 (1)
Writing some Python code 20 (1)
Getting back to VS Code Python 21 (1)
Using Jupyter Notebook for Coding 21 (6)
Chapter 2 Interactive Mode, Getting Help, 27 (22)
Writing Apps
Using Python Interactive Mode 27 (7)
Opening Terminal 28 (1)
Getting your Python version 28 (2)
Going into the Python Interpreter 30 (1)
Entering commands 30 (1)
Using Python's built-in help 31 (2)
Exiting interactive help 33 (1)
Searching for specific help topics online 33 (1)
Lots of free cheat sheets 34 (1)
Creating a Python Development Workspace 34 (3)
Creating a Folder for your Python Code 37 (2)
Typing, Editing, and Debugging Python Code 39 (6)
Writing Python code 40 (1)
Saving your code 41 (1)
Running Python in VS Code 41 (1)
Simple debugging 42 (1)
The VS Code Python debugger 43 (2)
Writing Code in a Jupyter Notebook 45 (4)
Creating a folder for Jupyter Notebook 45 (1)
Creating and saving a Jupyter notebook 46 (1)
Typing and running code in a notebook 46 (1)
Adding some Markdown text 47 (1)
Saving and opening notebooks 48 (1)
Chapter 3 Python Elements and Syntax 49 (12)
The Zen of Python 49 (4)
Object-Oriented Programming 53 (1)
Indentations Count, Big Time 54 (2)
Using Python Modules 56 (5)
Syntax for importing modules 58 (1)
Using an alias with modules 59 (2)
Chapter 4 Building Your First Python 61 (22)
Application
Open the Python App File 62 (1)
Typing and Using Python Comments 63 (1)
Understanding Python Data Types 64 (5)
Numbers 65 (1)
Words (strings) 66 (2)
True/false Booleans 68 (1)
Doing Work with Python Operators 69 (3)
Arithmetic operators 69 (1)
Comparison operators 70 (1)
Boolean operators 71 (1)
Creating and Using Variables 72 (6)
Creating valid variable names 73 (1)
Creating variables in code 74 (1)
Manipulating variables 75 (1)
Saving your work 76 (1)
Running your Python app in VS Code 76 (2)
What Syntax Is and Why It Matters 78 (4)
Putting Code Together 82 (1)
Book 2 Understanding Python Building Blocks 83 (182)
Chapter 1 Working with Numbers, Text, and 85 (40)
Dates
Calculating Numbers with Functions 86 (2)
Still More Math Functions 88 (3)
Formatting Numbers 91 (7)
Formatting with f-strings 91 (1)
Showing dollar amounts 92 (1)
Formatting percent numbers 93 (2)
Making multiline format strings 95 (1)
Formatting width and alignment 96 (2)
Grappling with Weirder Numbers 98 (2)
Binary, octal, and hexadecimal numbers 98 (1)
Complex numbers 99 (1)
Manipulating Strings 100(7)
Concatenating strings 101(1)
Getting the length of a string 102(1)
Working with common string operators 102(3)
Manipulating strings with methods 105(2)
Uncovering Dates and Times 107(11)
Working with dates 108(4)
Working with times 112(2)
Calculating timespans 114(4)
Accounting for Time Zones 118(2)
Working with Time Zones 120(5)
Chapter 2 Controlling-the Action 125(22)
Main Operators for Controlling the Action 125(1)
Making Decisions with if 126(8)
Adding else to your if login 130(1)
Handling multiple else's with elif 131(2)
Ternary operations 133(1)
Repeating a Process with for 134(7)
Looping through numbers in a range 134(2)
Looping through a string 136(1)
Looping through a list 137(1)
Bailing out of a loop 138(2)
Looping with continue 140(1)
Nesting loops 140(1)
Looping with while 141(6)
Starting while loops over with continue 143(1)
Breaking while loops with break 144(3)
Chapter 3 Speeding Along with Lists and Tuples 147(22)
Defining and Using Lists 147(16)
Referencing list items by position 148(2)
Looping through a list 150(1)
Seeing whether a list contains an item 150(1)
Getting the length of a list 151(1)
Adding an item to the end of a list 151(1)
Inserting an item into a list 152(1)
Changing an item in a list 153(1)
Combining lists 153(1)
Removing list items 154(2)
Clearing out a list 156(1)
Counting how many times an item appears 157(1)
in a list
Finding an list item's index 158(1)
Alphabetizing and sorting lists 159(2)
Reversing a list 161(1)
Copying a list 162(1)
What's a Tuple and Who Cares? 163(2)
Working with Sets 165(4)
Chapter 4 Cruising Massive Data with 169(24)
Dictionaries
Creating a Data Dictionary 171(8)
Accessing dictionary data 172(2)
Getting the length of a dictionary 174(1)
Seeing whether a key exists in a 175(1)
dictionary
Getting dictionary data with get() 176(1)
Changing the value of a key 177(1)
Adding or changing dictionary data 177(2)
Looping through a Dictionary 179(2)
Data Dictionary Methods 181(1)
Copying a Dictionary 182(1)
Deleting Dictionary Items 182(4)
Using pop() with Data Dictionaries 184(2)
Fun with Multi-Key Dictionaries 186(7)
Using the mysterious fromkeys and 188(2)
setdefault methods
Nesting Dictionaries 190(3)
Chapter 5 Wrangling Bigger Chunks of Code 193(20)
Creating a Function 194(1)
Commenting a Function 195(1)
Passing Information to a Function 196(9)
Defining optional parameters with defaults 198(1)
Passing multiple values to a function 199(1)
Using keyword arguments (kwargs) 200(2)
Passing multiple values in a list 202(2)
Passing in an arbitrary number of 204(1)
arguments
Returning Values from Functions 205(1)
Unmasking Anonymous Functions 206(7)
Chapter 6 Doing Python with Class 213(34)
Mastering Classes and Objects 213(3)
Creating a Class 216(1)
How a Class Creates an Instance 217(1)
Giving an Object Its Attributes 218(6)
Creating an instance from a class 219(3)
Changing the value of an attribute 222(1)
Defining attributes with default values 222(2)
Giving a Class Methods 224(10)
Passing parameters to methods 226(1)
Calling a class method by class name 227(1)
Using class variables 228(2)
Using class methods 230(2)
Using static methods 232(2)
Understanding Class Inheritance 234(13)
Creating the base (main) class 236(1)
Defining a subclass 237(2)
Overriding a default value from a subclass 239(1)
Adding extra parameters from a subclass 239(3)
Calling a base class method 242(1)
Using the same name twice 243(4)
Chapter 7 Sidestepping Errors 247(18)
Understanding Exceptions 247(4)
Handling Errors Gracefully 251(1)
Being Specific about Exceptions 252(1)
Keeping Your App from Crashing 253(2)
Adding an-else to the Mix 255(2)
Using try ... except ... else ... finally 257(2)
Raising Your Own Errors 259(6)
Book 3 Working With Python Libraries 265(88)
Chapter 1 Working with External Files 267(36)
Understanding Text and Binary Files 267(2)
Opening and Closing Files 269(7)
Reading a File's Contents 276(1)
Looping through a File 277(6)
Looping with readlines() 277(2)
Looping with readline() 279(1)
Appending versus overwriting files 280(1)
Using tell() to determine the pointer 281(2)
location
Moving the pointer with seek() 283(1)
Reading and Copying a Binary File 283(3)
Conquering CSV Files 286(9)
Opening a CSV file 288(2)
Converting strings 290(1)
Converting to integers 291(1)
Converting to date 292(1)
Converting to Boolean 293(1)
Converting to floats 293(2)
From CSV to Objects and Dictionaries 295(8)
Importing CSV to Python objects 296(3)
Importing CSV to Python dictionaries 299(4)
Chapter 2 Juggling JSON Data 303(20)
Organizing JSON Data 303(3)
Understanding Serialization 306(1)
Loading Data from JSON Files 307(11)
Converting an Excel date to a JSON date 309(1)
Looping through a keyed JSON file 310(3)
Converting firebase timestamps to Python 313(1)
dates
Loading unkeyed JSON from a Python string 314(1)
Loading keyed JSON from a Python string 315(1)
Changing JSON data 316(1)
Removing data from a dictionary 317(1)
Dumping Python Data to JSON 318(5)
Chapter 3 Interacting with the Internet 323(16)
How the Web Works 323(4)
Understanding the mysterious URL 324(1)
Exposing the HTTP headers 325(2)
Opening a URL from Python 327(1)
Posting to the Web with Python 328(2)
Scraping the Web with Python 330(9)
Parsing part of a page 333(1)
Storing the parsed content 333(2)
Saving scraped data to a JSON file 335(1)
Saving scraped data to a CSV file 336(3)
Chapter 4 Libraries, Packages, and Modules 339(14)
Understanding the Python Standard Library 339(4)
Using the dir() function 340(1)
Using the help() function 341(2)
Exploring built-in functions 343(1)
Exploring Python Packages 343(2)
Importing Python Modules 345(3)
Making Your Own Modules 348(5)
Book 4 Using Artificial Intelligence In Python 353(74)
Chapter 1 Exploring Artificial Intelligence 355(10)
AI Is a Collection of Techniques 356(7)
Neural networks 356(3)
Machine learning 359(2)
TensorFlow - A framework for deep learning 361(2)
Current Limitations of AI 363(2)
Chapter 2 Building a Neural Network in Python 365(28)
Understanding Neural Networks 366(4)
Layers of neurons 367(1)
Weights and biases 368(1)
The activation function 369(1)
Loss function 369(1)
Building a Simple Neural Network in Python 370(13)
The neural-net Python code 370(11)
Using TensorFlow for the same neural 381(1)
network
Installing the TensorFlow Python library 382(1)
Building a Python Neural Network in 383(10)
TensorFlow
Loading your data 384(1)
Defining your neural-network model and 384(1)
layers
Compiling your model 384(1)
Fitting and training your model 384(2)
Breaking down the code 386(2)
Evaluating the model 388(2)
Changing to a three-layer neural network 390(3)
in TensorFlow/Keras
Chapter 3 Doing Machine Learning in Python 393(22)
Learning by Looking for Solutions in All 394(1)
the Wrong Places
Classifying Clothes with Machine Learning 395(1)
Training and Learning with TensorFlow 395(1)
Setting Up the Software Environment for 396(1)
this Chapter
Creating a Machine-Learning Network for 397(12)
Detecting Clothes Types
Getting the data - The Fashion-MNIST 398(1)
dataset
Training the network 398(1)
Testing our network 398(1)
Breaking down the code 399(3)
Results of the training and evaluation 402(1)
Testing a single test image 402(1)
Testing on external pictures 403(2)
The results, round 1 405(1)
The CNN model code 406(3)
The results, round 2 409(1)
Visualizing with MatPlotLib 409(4)
Learning More Machine Learning 413(2)
Chapter 4 Exploring More AI in Python 415(12)
Limitations of the Raspberry Pi and AI 415(3)
Adding Hardware AI to the Raspberry Pi 418(2)
AI in the Cloud 420(3)
Google cloud 421(1)
Amazon Web Services 421(1)
IBM cloud 422(1)
Microsoft Azure 422(1)
AI on a Graphics Card 423(1)
Where to Go for More AI Fun in Python 424(3)
Book 5 Doing Data Science With Python 427(42)
Chapter 1 The Five Areas of Data Science 429(8)
Working with Big, Big Data 430(2)
Volume 430(1)
Variety 431(1)
Velocity 431(1)
Managing volume, variety, and velocity 432(1)
Cooking with Gas: The Five Step Process of 432(5)
Data Science
Capturing the data 433(1)
Processing the data 433(1)
Analyzing the data 434(1)
Communicating the results 434(1)
Maintaining the data 435(2)
Chapter 2 Exploring Big Data with Python 437(14)
Introducing NumPy, Pandas, and MatPlotLib 438(2)
Doing Your First Data Science Project 440(11)
Diamonds are a data scientist's best 440(3)
friend
Breaking down the code 443(1)
Visualizing the data with MatPlotLib 444(7)
Chapter 3 Using Big Data from the Google Cloud 451(18)
What Is Big Data 451(1)
Understanding the Google Cloud and BigQuery 452(2)
The Google Cloud Platform 452(1)
BigQuery from Google 452(1)
Computer security on the cloud 453(1)
Signing up on Google for BigQuery 454(1)
Reading the Medicare Big Data 454(12)
Setting up your project and authentication 454(3)
The first big-data code 457(3)
Breaking down the code 460(1)
A bit of analysis next 461(3)
Payment percent by state 464(1)
And now some visualization 465(1)
Looking for the Most Polluted City in the 466(3)
World on an Hourly Basis
Book 6 Talking To Hardware With Python 469(96)
Chapter 1 Introduction to Physical Computing 471(16)
Physical Computing Is Fun 472(1)
What Is a Raspberry Pi? 472(2)
Making Your Computer Do Things 474(1)
Using Small Computers to Build Projects 474(2)
That Do and Sense Things
The Raspberry Pi: A Perfect Platform for 476(6)
Physical Computing in Python
GPIO pins 477(1)
GPIO libraries 477(1)
The hardware for "Hello World" 478(1)
Assembling the hardware 478(4)
Controlling the LED with Python on the 482(3)
Raspberry Pi
But Wait, There Is More 485(2)
Chapter 2 No Soldering! Grove Connectors for 487(18)
Building Things
So What Is a Grove Connector? 488(1)
Selecting Grove Base Units 489(3)
For the Arduino 489(1)
Raspberry Pi Base Unit - the Pi2Grover 490(2)
The Four Types of Grove Connectors 492(1)
The Four Types of Grove Signals 493(6)
Grove digital - All about those 1's 493(1)
and 0's
Grove analog: When 1's and 0's 494(1)
aren't enough
Grove UART (or serial) - Bit by bit 495(2)
transmission
Grove I2C - Using I2C to make sense of 497(2)
the world
Using Grove Cables to Get Connected 499(6)
Grove Patch Cables 499(6)
Chapter 3 Sensing the World with Python: The 505(32)
World of I2C
Understanding I2C 506(11)
Exploring I2C on the Raspberry Pi 507(1)
Talking to I2C devices with Python 508(3)
Reading temperature and humidity from an 511(3)
I2C device using Python
Breaking down the program 514(3)
A Fun Experiment for Measuring Oxygen and a 517(8)
Flame
Analog-to-digital converters (ADC) 518(1)
The Grove oxygen sensor 519(1)
Hooking up the oxygen experiment 520(2)
Breaking down the code 522(3)
Building a Dashboard on Your Phone Using 525(12)
Blynk and Python
HDC1080 temperature and humidity sensor 525(2)
redux
How to add the Blynk dashboard 527(4)
The modified temperatureTest.py software 531(2)
for the Blynk app
Breaking down the code 533(3)
Where to Go from Here 536(1)
Chapter 4 Making Things Move with Python 537(28)
Exploring Electric Motors 538(2)
Small DC motors 538(1)
Servo motors 539(1)
Stepper motors 539(1)
Controlling Motors with a Computer 540(27)
Python and DC Motors 540(8)
Python and running a servo motor 548(6)
Python and making a stepper motor step 554(11)
Book 7 Building Robots With Python 565(82)
Chapter 1 Introduction to Robotics 567(8)
A Robot Is Not Always like a Human 567(1)
Not Every Robot Has Arms or Wheels 568(4)
The Wilkinson Bread-Making Robot 569(1)
Baxter the Coffee-Making Robot 570(1)
The Griffin Bluetooth-enabled toaster 571(1)
Understanding the Main Parts of a Robot 572(2)
Computers 572(1)
Motors and actuators 573(1)
Communications 573(1)
Sensors 573(1)
Programming Robots 574(1)
Chapter 2 Building Your First Python Robot 575(20)
Introducing the Mars Rover PiCar-B 575(11)
What you need for the build 576(1)
Understanding the robot components 577(9)
Assembling the Robot 586(9)
Calibrating your servos 588(3)
Running tests on your rover in Python 591(1)
Installing software for the CarPi-B 591(1)
Python test
The PiCar-B Python test code 592(1)
Pi camera video testing 592(3)
Chapter 3 Programming Your Robot Rover in 595(28)
Python
Building a Simple High-Level Python 595(2)
Interface
The motorForward function 596(1)
The wheelsLeft function 596(1)
The wheelsPercent function 596(1)
Making a Single Move with Python 597(1)
Functions of the RobotInterface Class 598(12)
Front LED functions 598(2)
Pixel strip functions 600(1)
Ultrasonic distance sensor function 601(1)
Main motor functions 602(1)
Servo functions 603(3)
General servo function 606(1)
The Python Robot Interface Test 606(4)
Coordinating Motor Movements with Sensors 610(3)
Making a Python Brain for Our Robot 613(10)
A Better Robot Brain Architecture 620(1)
Overview of the Included Adeept Software 621(1)
Where to Go from Here? 622(1)
Chapter 4 Using Artificial Intelligence in 623(24)
Robotics
This Chapter's Project: Going to the 624(1)
Dogs
Setting Up the Project 624(1)
Machine Learning Using TensorFlow 625(8)
The code 627(2)
Examining the code 629(3)
The results 632(1)
Testing the Trained Network 633(7)
The code 634(2)
Explaining the code 636(1)
The results 637(3)
Taking Cats and Dogs to Our Robot 640(5)
The code 640(3)
How it works 643(1)
The results 643(2)
Other Things You Can Do with AI Techniques 645(1)
and the Robot
Cat/Not Cat 645(1)
Santa/Not Santa 646(1)
Follow the ball 646(1)
Using Alexa to control your robot 646(1)
AI and the Future of Robotics 646(1)
Index 647