Python for AI
A Gentle Start for Complete Beginners
- Pages
- 84
- Chapters
- 32
- Level
- Beginner
- Format
- E-book
About this book
You do not need a computer-science degree to work with AI in code. You need a solid grasp of a small part of Python and the confidence to experiment. This book provides both.
Starting from the very beginning, it covers variables, lists, dictionaries, loops, functions and files, then moves to working with data in tables, making charts, calling web APIs and using a language model from code. Every concept comes with a short example you can type and run, and every chapter ends with exercises and solutions.
By the end you will have written small but genuinely useful programs, such as a document summariser and a data-cleaning script.
What you will learn
- Python basics from zero: values, lists, dictionaries, loops and functions
- Reading and writing files, CSV and JSON
- Exploring and cleaning tabular data
- Making simple charts
- Calling web APIs and language models from code
- Writing small, useful AI tools safely
Table of contents
- IntroductionIntroduction
- Chapter 1Why Python, and How to Start
- Chapter 2Running Your First Program
- Chapter 3Values, Variables and Types
- Chapter 4Text: Strings
- Chapter 5Numbers and Arithmetic
- Chapter 6Lists
- Chapter 7Dictionaries
- Chapter 8Making Decisions: if
- Chapter 9Repeating: Loops
- Chapter 10Functions
- Chapter 11Errors and Debugging
- Chapter 12Modules and Packages
- Chapter 13Files
- Chapter 14CSV Data
- Chapter 15JSON
- Chapter 16Tables With pandas
- Chapter 17Cleaning Data
- Chapter 18Summarising and Grouping
- Chapter 19Charts
- Chapter 20Calling Web APIs
- Chapter 21Keeping Secrets Safe
- Chapter 22Calling a Language Model
- Chapter 23Project: A Document Summariser
- Chapter 24Project: Cleaning a Messy Spreadsheet
- Chapter 25Project: Classifying Feedback
- Chapter 26Dates and Times
- Chapter 27Finding Patterns in Text
- Chapter 28Retries, Rate Limits and Batching
- Chapter 29Project: Answering Questions From Your Documents
- Chapter 30Writing Code With an AI Assistant
- Chapter 31Good Habits: Readability, Testing and Version Control
- Chapter 32Where to Go Next
- AppendixExercise Solutions
- GlossaryGlossary
Who this book is for
Complete beginners, analysts and professionals who want to start coding for AI and data. No prior programming experience required.
Details
| Format | PDF + web edition |
|---|---|
| Length | 84 pages (approx.) |
| Chapters | 32 |
| Level | Beginner |
| Language | English |
| Topic | Programming |
| Author | Latent Library Editorial |
Keep reading