1. Python Basics

1. Python Basics#

Before we can build predictive models, we need two things: a way of running code, and a way of getting our data into it. This chapter provides both, in the smallest useful dose.

If you already write python comfortably, skim the first page and read the second one, which introduces the example dataset used throughout the rest of the book.

In this chapter:

  • Introduction to Python — running code in the browser, the handful of language constructs the book relies on.

  • Working with DataFrames — loading, slicing and plotting the example dataset: cortical volumes and age from the IXI cohort.