Skip to content

Free Textbooks

Four books. All free.
Host your own copy.

Each textbook is built with JupyterBook and lives on its own subdomain, so every code cell is runnable and every page is indexable.

  1. Volume I

    Python for Humanists

    A book-length, ground-up introduction to Python — written for those with no programming background. Covers variables, data structures, loops, functions, files, and libraries through humanities-flavored examples.

    Read at python-textbook.pythonhumanities.com

  2. Volume II

    Named Entity Recognition

    How to extract people, places, and organizations from unstructured text. Builds from rule-based approaches through statistical models with spaCy, with working code at every step.

    Read at ner.pythonhumanities.com

  3. Volume III

    spaCy

    The written companion to the freeCodeCamp course. A practical tour of spaCy's pipeline components, the Matcher, rule-based entity recognition, and training custom models.

    Read at spacy.pythonhumanities.com

  4. Volume IV

    BookNLP

    Using BookNLP to perform book-scale natural language processing: character detection, quotation attribution, supersense tagging, and event extraction for literary texts.

    Read at booknlp.pythonhumanities.com

  5. Volume V

    Pandas for Humanists

    A practical, humanities-flavoured tour of pandas: building DataFrames, cleaning messy spreadsheets, filtering and grouping, and exporting data for the next stage of a project.

    Read at pandas.pythonhumanities.com

  6. Volume VI

    Intermediate Python for Humanists

    The next step after the basics: enumerate, zip, map, filter, lambda, list comprehensions, generators, and Counter — the everyday tools that make Python code shorter and faster.

    Read at intermediate-python.pythonhumanities.com