Data science

Stage 1 of 10 · 7 lessons · ~5 weeks

Python for data: NumPy and pandas

Set up notebooks and a clean environment, then learn the data frame work you will do every day: loading, selecting, filtering, grouping, joining and reshaping.

Start: Notebooks and a clean environment

Lessons· one lesson for each topic, in this order

  1. 1Notebooks and a clean environment
  2. 2NumPy arrays and vectorised maths
  3. 3Loading and inspecting a DataFrame
  4. 4Selecting columns and filtering rows
  5. 5Grouping and summarising
  6. 6Joining tables
  7. 7Reshaping between long and wide

Do this

  • Set up a notebook tool and a per-project environment, and put the project in Git.
  • Load a public dataset and check its shape, types and first rows.
  • Write filters for three different populations and state each one in plain words.
  • Produce a summary per group with a count column next to every average.
  • Join two tables and check the row count before and after.
  • Reshape one table from wide to long and back.

Start with· follow one of these

  • CoursePaid
    Grokking Python Fundamentals

    Design Gurus · Beginner · $50

    Solid Python basics first: data types, collections, functions and files, the ground pandas stands on

  • CourseFree
    Kaggle Learn

    Kaggle · Beginner

    Free: the Python and Pandas courses, short lessons with exercises that run in the browser

Practise

  • Pick one dataset on a topic you care about and repeat every operation in this stage on it

Keep handy

  • The indexing, merging and reshaping pages answer most "how do I" questions

  • The absolute beginners guide, then the reference when an array does something unexpected

Also worth your time

Before moving on: A notebook that loads a real public dataset, checks its types, filters it to one clear population, joins a second table with a row-count check, reshapes it, and prints three summary tables, all rerunnable from a clean start.

Tauseef's advice
Do not try to learn the whole library. Twenty operations cover most real work: learn those until you can write them without searching, and look the rest up when you need them. Use a real dataset you care about from the first week, because toy examples never show you the messy parts.

Mark this stage as not done?