The professional programmer's Deitel® guide to Python® with introductory artificial intelligence case studies Written for programmers with a background in another high-level language, Python for Programmers uses hands-on instruction to teach today's most compelling, leading-edge computing technologies and programming in Python--one of the world's most popular and fastest-growing languages. Please read the Table of Contents diagram inside the front cover and the Preface for more details. In the context of 500+, real-world examples ranging from individual snippets to 40 large scripts and full implementation case studies, you'll use the interactive IPython interpreter with code in Jupyter Notebooks to quickly master the latest Python coding idioms. After covering Python Chapters 1-5 and a few key parts of Chapters 6-7, you'll be able to handle significant portions of the hands-on introductory AI case studies in Chapters 11-16, which are loaded with cool, powerful, contemporary examples. These include natural language processing, data mining Twitter® for sentiment analysis, cognitive computing with IBM® WatsonTM, supervised machine learning with classification and regression, unsupervised machine learning with clustering, computer vision through deep learning and convolutional neural networks, deep learning with recurrent neural networks, big data with Hadoop®, SparkTM and NoSQL databases, the Internet of Things and more. You'll also work directly or indirectly with cloud-based services, including Twitter, Google TranslateTM, IBM Watson, Microsoft® Azure®, OpenMapQuest, PubNub and more. Features 500+ hands-on, real-world, live-code examples from snippets to case studiesIPython + code in Jupyter® NotebooksLibrary-focused: Uses Python Standard Library and data science libraries to accomplish significant tasks with minimal codeRich Python coverage: Control statements, functions, strings, files, JSON serialization, CSV, exceptionsProcedural, functional-style and object-oriented programmingCollections: Lists, tuples, dictionaries, sets, NumPy arrays, pandas Series & DataFramesStatic, dynamic and interactive visualizationsData experiences with real-world datasets and data sourcesIntro to Data Science sections: AI, basic stats, simulation, animation, random variables, data wrangling, regressionAI, big data and cloud data science case studies: NLP, data mining Twitter®, IBM® WatsonTM, machine learning, deep learning, computer vision, Hadoop®, SparkTM, NoSQL, IoTOpen-source libraries: NumPy, pandas, Matplotlib, Seaborn, Folium, SciPy, NLTK, TextBlob, spaCy, Textatistic, Tweepy, scikit-learn®, Keras and more Register your product to gain access to updated chapters and material, as well as downloads, future updates, and/or corrections as they become available. See inside book for more information.
Les mer
Preface xviiBefore You Begin xxxiiiChapter 1: Introduction to Computers and Python 11.1 Introduction 21.2 A Quick Review of Object Technology Basics 31.3 Python 51.4 It’s the Libraries! 71.5 Test-Drives: Using IPython and Jupyter Notebooks 91.6 The Cloud and the Internet of Things 161.7 How Big Is Big Data? 171.8 Case Study—A Big-Data Mobile Application 241.9 Intro to Data Science: Artificial Intelligence—at the Intersection of CS and Data Science 261.10 Wrap-Up 29Chapter 2: Introduction to Python Programming 312.1 Introduction 322.2 Variables and Assignment Statements 322.3 Arithmetic 332.4 Function print and an Intro to Single- and Double-Quoted Strings 362.5 Triple-Quoted Strings 382.6 Getting Input from the User 392.7 Decision Making: The if Statement and Comparison Operators 412.8 Objects and Dynamic Typing 452.9 Intro to Data Science: Basic Descriptive Statistics 462.10 Wrap-Up 48Chapter 3: Control Statements 493.1 Introduction 503.2 Control Statements 503.3 if Statement 513.4 if...else and if...elif...else Statements 523.5 while Statement 553.6 for Statement 553.7 Augmented Assignments 573.8 Sequence-Controlled Iteration; Formatted Strings 583.9 Sentinel-Controlled Iteration 593.10 Built-In Function range: A Deeper Look 603.11 Using Type Decimal for Monetary Amounts 613.12 break and continue Statements 643.13 Boolean Operators and, or and not 653.14 Intro to Data Science: Measures of Central Tendency—Mean, Median and Mode 673.15 Wrap-Up 69Chapter 4: Functions 714.1 Introduction 724.2 Defining Functions 724.3 Functions with Multiple Parameters 754.4 Random-Number Generation 764.5 Case Study: A Game of Chance 784.6 Python Standard Library 814.7 math Module Functions 824.8 Using IPython Tab Completion for Discovery 834.9 Default Parameter Values 854.10 Keyword Arguments 854.11 Arbitrary Argument Lists 864.12 Methods: Functions That Belong to Objects 874.13 Scope Rules 874.14 import: A Deeper Look 894.15 Passing Arguments to Functions: A Deeper Look 904.16 Recursion 934.17 Functional-Style Programming 954.18 Intro to Data Science: Measures of Dispersion 974.19 Wrap-Up 98Chapter 5: Sequences: Lists and Tuples 1015.1 Introduction 1025.2 Lists 1025.3 Tuples 1065.4 Unpacking Sequences 1085.5 Sequence Slicing 1105.6 del Statement 1125.7 Passing Lists to Functions 1135.8 Sorting Lists 1155.9 Searching Sequences 1165.10 Other List Methods 1175.11 Simulating Stacks with Lists 1195.12 List Comprehensions 1205.13 Generator Expressions 1215.14 Filter, Map and Reduce 1225.15 Other Sequence Processing Functions 1245.16 Two-Dimensional Lists 1265.17 Intro to Data Science: Simulation and Static Visualizations 1285.18 Wrap-Up 135Chapter 6: Dictionaries and Sets 1376.1 Introduction 1386.2 Dictionaries 1386.3 Sets 1476.4 Intro to Data Science: Dynamic Visualizations 1526.5 Wrap-Up 158Chapter 7: Array-Oriented Programming with NumPy 1597.1 Introduction 1607.2 Creating arrays from Existing Data 1607.3 array Attributes 1617.4 Filling arrays with Specific Values 1637.5 Creating arrays from Ranges 1647.6 List vs. array Performance: Introducing %timeit 1657.7 array Operators 1677.8 NumPy Calculation Methods 1697.9 Universal Functions 1707.10 Indexing and Slicing 1717.11 Views: Shallow Copies 1737.12 Deep Copies 1747.13 Reshaping and Transposing 1757.14 Intro to Data Science: pandas Series and DataFrames 1777.15 Wrap-Up 189Chapter 8: Strings: A Deeper Look 1918.1 Introduction 1928.2 Formatting Strings 1938.3 Concatenating and Repeating Strings 1968.4 Stripping Whitespace from Strings 1978.5 Changing Character Case 1978.6 Comparison Operators for Strings 1988.7 Searching for Substrings 1988.8 Replacing Substrings 1998.9 Splitting and Joining Strings 2008.10 Characters and Character-Testing Methods 2028.11 Raw Strings 2038.12 Introduction to Regular Expressions 2038.13 Intro to Data Science: Pandas, Regular Expressions and Data Munging 2108.14 Wrap-Up 214Chapter 9: Files and Exceptions 2179.1 Introduction 2189.2 Files 2199.3 Text-File Processing 2199.4 Updating Text Files 2229.5 Serialization with JSON 2239.6 Focus on Security: pickle Serialization and Deserialization 2269.7 Additional Notes Regarding Files 2269.8 Handling Exceptions 2279.9 finally Clause 2319.10 Explicitly Raising an Exception 2339.11 (Optional) Stack Unwinding and Tracebacks 2339.12 Intro to Data Science: Working with CSV Files 2359.13 Wrap-Up 241Chapter 10: Object-Oriented Programming 24310.1 Introduction 24410.2 Custom Class Account 24610.3 Controlling Access to Attributes 24910.4 Properties for Data Access 25010.5 Simulating “Private” Attributes 25610.6 Case Study: Card Shuffling and Dealing Simulation 25810.7 Inheritance: Base Classes and Subclasses 26610.8 Building an Inheritance Hierarchy; Introducing Polymorphism 26710.9 Duck Typing and Polymorphism 27510.10 Operator Overloading 27610.11 Exception Class Hierarchy and Custom Exceptions 27910.12 Named Tuples 28010.13 A Brief Intro to Python 3.7’s New Data Classes 28110.14 Unit Testing with Docstrings and doctest 28710.15 Namespaces and Scopes 29010.16 Intro to Data Science: Time Series and Simple Linear Regression 29310.17 Wrap-Up 301Chapter 11: Natural Language Processing (NLP) 30311.1 Introduction 30411.2 TextBlob 30511.3 Visualizing Word Frequencies with Bar Charts and Word Clouds 31911.4 Readability Assessment with Textatistic 32411.5 Named Entity Recognition with spaCy 32611.6 Similarity Detection with spaCy 32711.7 Other NLP Libraries and Tools 32811.8 Machine Learning and Deep Learning Natural Language Applications 32811.9 Natural Language Datasets 32911.10 Wrap-Up 330Chapter 12: Data Mining Twitter 33112.1 Introduction 33212.2 Overview of the Twitter APIs 33412.3 Creating a Twitter Account 33512.4 Getting Twitter Credentials—Creating an App 33512.5 What’s in a Tweet? 33712.6 Tweepy 34012.7 Authenticating with Twitter Via Tweepy 34112.8 Getting Information About a Twitter Account 34212.9 Introduction to Tweepy Cursors: Getting an Account’s Followers and Friends 34412.10 Searching Recent Tweets 34712.11 Spotting Trends: Twitter Trends API 34912.12 Cleaning/Preprocessing Tweets for Analysis 35312.13 Twitter Streaming API 35412.14 Tweet Sentiment Analysis 35912.15 Geocoding and Mapping 36212.16 Ways to Store Tweets 37012.17 Twitter and Time Series 37012.18 Wrap-Up 371Chapter 13: IBM Watson and Cognitive Computing 37313.1 Introduction: IBM Watson and Cognitive Computing 37413.2 IBM Cloud Account and Cloud Console 37513.3 Watson Services 37613.4 Additional Services and Tools 37913.5 Watson Developer Cloud Python SDK 38113.6 Case Study: Traveler’s Companion Translation App 38113.7 Watson Resources 39413.8 Wrap-Up 395Chapter 14: Machine Learning: Classification, Regression and Clustering 39714.1 Introduction to Machine Learning 39814.2 Case Study: Classification with k-Nearest Neighbors and the Digits Dataset, Part 1 40314.3 Case Study: Classification with k-Nearest Neighbors and the Digits Dataset, Part 2 41314.4 Case Study: Time Series and Simple Linear Regression 42014.5 Case Study: Multiple Linear Regression with the California Housing Dataset 42514.6 Case Study: Unsupervised Machine Learning, Part 1—Dimensionality Reduction 43814.7 Case Study: Unsupervised Machine Learning, Part 2—k-Means Clustering 44214.8 Wrap-Up 455Chapter 15: Deep Learning 45715.1 Introduction 45815.2 Keras Built-In Datasets 46115.3 Custom Anaconda Environments 46215.4 Neural Networks 46315.5 Tensors 46515.6 Convolutional Neural Networks for Vision; Multi-Classification with the MNIST Dataset 46715.7 Visualizing Neural Network Training with TensorBoard 48615.8 ConvnetJS: Browser-Based Deep-Learning Training and Visualization 48915.9 Recurrent Neural Networks for Sequences; Sentiment Analysis with the IMDb Dataset 48915.10 Tuning Deep Learning Models 49715.11 Convnet Models Pretrained on ImageNet 49815.12 Wrap-Up 499Chapter 16: Big Data: Hadoop, Spark, NoSQL and IoT 50116.1 Introduction 50216.2 Relational Databases and Structured Query Language (SQL) 50616.3 NoSQL and NewSQL Big-Data Databases: A Brief Tour 51716.4 Case Study: A MongoDB JSON Document Database 52016.5 Hadoop 53016.6 Spark 54116.7 Spark Streaming: Counting Twitter Hashtags Using the pyspark-notebook Docker Stack 55116.8 Internet of Things and Dashboards 56016.9 Wrap-Up 571Index 573
Les mer
“The chapters are clearly written with detailed explanations of the example code. The modular structure, wide range of contemporary data science topics, and code in companion Jupyter notebooks make this a fantastic resource for readers of a variety of backgrounds. Fabulous Big Data chapter—it covers all of the relevant programs and platforms. Great Watson chapter! The chapter provides a great overview of the Watson applications. Also, your translation examples are great because they provide an ‘instant reward’—it’s very satisfying to implement a task and receive results so quickly. Machine Learning is a huge topic, and the chapter serves as a great introduction. I loved the California housing data example—very relevant for business analytics. The chapter was visually stunning.” —Alison Sanchez, Assistant Professor in Economics, University of San Diego “A great introduction to Big Data concepts, notably Hadoop, Spark, and IoT. The examples are extremely realistic and practical. The authors do an excellent job of combining programming and data science topics. The material is presented in digestible sections accompanied by engaging interactive examples. Nearly all concepts are accompanied by a worked-out example. A comprehensive overview of object-oriented programming in Python—the use of card image graphics is sure to engage the reader.” —Garrett Dancik, Eastern Connecticut State University “Covers some of the most modern Python syntax approaches and introduces community standards for style and documentation. The machine learning chapter does a great job of walking people through the boilerplate code needed for ML in Python. The case studies accomplish this really well. The later examples are so visual. Many of the model evaluation tasks make for really good programming practice. I can see readers feeling really excited about playing with the animations.” —Elizabeth Wickes, Lecturer, School of Information Sciences, University of Illinois at Urbana-Champaign “An engaging, highly accessible book that will foster curiosity and motivate beginning data scientists to develop essential foundations in Python programming, statistics, data manipulation, working with APIs, data visualization, machine learning, cloud computing, and more. Great walkthrough of the Twitter APIs—sentiment analysis piece is very useful. I’ve taken several classes that cover natural language processing and this is the first time the tools and concepts have been explained so clearly. I appreciate the discussion of serialization with JSON and pickling and when to use one or the other—with an emphasis on using JSON over pickle—good to know there’s a better, safer way!” —Jamie Whitacre, Data Science Consultant “For a while, I have been looking for a book in Data Science using Python that would cover the most relevant technologies. Well, my search is over. A must-have book for any practitioner of this field. The machine learning chapter is a real winner!! The dynamic visualization is fantastic.” —Ramon Mata-Toledo, Professor, James Madison University “I like the new combination of topics from computer science, data science, and stats. This is important for building data science programs that are more than just cobbling together math and computer science courses. A book like this may help facilitate expanding our offerings and using Python as a bridge for computer and data science topics. For a data science program that focuses on a single language (mostly), I think Python is probably the way to go.” —Lance Bryant, Shippensburg University “You’ll develop applications using industry standard libraries and cloud computing services.” —Daniel Chen, Data Scientist, Lander Analytics “Great introduction to Python! This book has my strongest recommendation both as an introduction to Python as well as Data Science.” —Shyamal Mitra, Senior Lecturer, University of Texas “IBM Watson is an exciting chapter. The code examples put together a lot of Watson services in a really nifty example.” —Daniel Chen, Data Scientist, Lander Analytics “Fun, engaging real-world examples will encourage readers to conduct meaningful data analyses. Provides many of the best explanations of data science concepts I’ve encountered. Introduces the most useful starter machine learning models—does a good job explaining how to choose the best model and what ‘the best’ means. Great overview of all the big data technologies with relevant examples.” —Jamie Whitacre, Data Science Consultant “A great introduction to deep learning.” —Alison Sanchez, University of San Diego “The best designed Intro to Data Science/Python book I have seen.” —Roland DePratti, Central Connecticut State University “I like the new combination of topics from computer science, data science, and stats.” —Lance Bryant, Shippensburg University “The book’s applied approach should engage readers. A fantastic job providing background on various machine learning concepts without burdening the users with too many mathematical details.” —Garrett Dancik, Assoc. Prof. of Computer Science/Bioinformatics, Eastern Connecticut State University “Helps readers leverage the large number of existing libraries to accomplish tasks with minimal code. Concepts are accompanied by rich Python examples that readers can adapt to implement their own solutions to data science problems. I like that cloud services are used.” —David Koop, Assistant Professor, U-Mass Dartmouth “I enjoyed the OOP chapter—doctest unit testing is nice because you can have the test in the actual docstring so things are traveling together. The line-by-line explanations of the static and dynamic visualizations of the die rolling example are just great.” —Daniel Chen, Data Scientist, Lander Analytics “A lucid exposition of the fundamentals of Python and Data Science. Thanks for pointing out seeding the random number generator for reproducibility. I like the use of dictionary and set comprehensions for succinct programming. ‘List vs. Array Performance: Introducing %timeit’ is convincing on why one should use ndarrays. Good defensive programming. Great section on Pandas Series and DataFrames—one of the clearest expositions that I have seen. The section on data wrangling is excellent. Natural Language Processing is an excellent chapter! I learned a tremendous amount going through it.” —Shyamal Mitra, Senior Lecturer, University of Texas “I like the discussion of exceptions and tracebacks. I really liked the Data Mining Twitter chapter; it focused on a real data source and brought in a lot of techniques for analysis (e.g., visualization, NLP). I like that the Python modules helped hide some of the complexity. Word clouds look cool.” —David Koop, Assistant Professor, U-Mass Dartmouth “I love the book! The examples are definitely a high point.” —Dr. Irene Bruno, George Mason University “I was very excited to see this book. I like its focus on data science and a general purpose language for writing useful data science programs. The data science portion distinguishes this book from most other introductory Python books.” —Dr. Harvey Siy, University of Nebraska at Omaha “I’ve learned a lot in this review process, discovering the exciting field of AI. I’ve liked the Deep Learning chapter, which has left me amazed with the things that have already been achieved in this field.” —José Antonio González Seco, Consultant “An impressive hands-on approach to programming meant for exploration and experimentation.” —Elizabeth Wickes, Lecturer, School of Information Sciences, University of Illinois at Urbana-Champaign “I was impressed at how easy it was to get started with NLP using Python. A meaningful overview of deep learning concepts, using Keras. I like the streaming example.” —David Koop, Assistant Professor, U-Mass Dartmouth “Really like the use of f-strings, instead of the older string-formatting methods. Seeing how easy TextBlob is compared to base NLTK was great. I never made word clouds with shapes before, but I can see this being a motivating example for people getting started with NLP. I’m enjoying the case-study chapters in the latter parts of the book. They are really practical. I really enjoyed working through all the Big Data examples, especially the IoT ones.” —Daniel Chen, Data Scientist, Lander Analytics “I really liked the live IPython input-output. The thing that I like most about this product is that it is a Deitel & Deitel book (I’m a big fan) that covers Python.” —Dr. Mark Pauley, University of Nebraska at Omaha  
Les mer
The practicing programmer’s DEITEL® guide to Python development Applies the Deitels’ signature live-code approach that has helped millions of developers to quickly master new programming languagesCovers the Python language and Python APIs in depthFeatures hundreds of complete Python programs, with thousands of lines of proven codeIncludes hundreds of tips for building robust applications
Les mer

Produktdetaljer

ISBN
9780135224335
Publisert
2018-10-15
Utgiver
Vendor
Pearson
Vekt
1040 gr
Høyde
230 mm
Bredde
178 mm
Dybde
32 mm
Aldersnivå
P, 06
Språk
Product language
Engelsk
Format
Product format
Heftet
Antall sider
640

Biographical note

Paul Deitel, CEO and Chief Technical Officer of Deitel & Associates, Inc., is a graduate of MIT, where he studied Information Technology. Through Deitel & Associates, Inc., he has delivered hundreds of programming courses worldwide to clients, including Cisco, IBM, Siemens, Sun Microsystems, Dell, Fidelity, NASA at the Kennedy Space Center, the National Severe Storm Laboratory, White Sands Missile Range, Rogue Wave Software, Boeing, SunGard Higher Education, Nortel Networks, Puma, iRobot, Invensys and many more. He and his co-author, Dr. Harvey M. Deitel, are the world’s best-selling programming-language textbook/professional book/video authors. Dr. Harvey Deitel, Chairman and Chief Strategy Officer of Deitel & Associates, Inc., has over 50 years of experience in the computer field. Dr. Deitel earned B.S. and M.S. degrees in Electrical Engineering from MIT and a Ph.D. in Mathematics from Boston University. He has extensive college teaching experience, including earning tenure and serving as the Chairman of the Computer Science Department at Boston College before founding Deitel & Associates, Inc., in 1991 with his son, Paul. The Deitels’ publications have earned international recognition, with translations published in Japanese, German, Russian, Spanish, French, Polish, Italian, Simplified Chinese, Traditional Chinese, Korean, Portuguese, Greek, Urdu and Turkish. Dr. Deitel has delivered hundreds of programming courses to corporate, academic, government and military clients.