Data Analysis with pandas and NumPy

Data Analysis with pandas and NumPy is an intermediate-level course of 6 lessons (about 3 h 20 min), with 18 exercises and 18 quiz questions. Prerequisites: Python Fundamentals. Exercises run in the browser, with nothing to install.

  • Python
  • Intermediate
  • 6 lessons
  • 3 h 20 min
  • 18 exercises
  • Exercises run in the browser

The course in brief

This course teaches you how to carry out a complete data analysis with NumPy and pandas. You load and inspect files, select and filter rows, create metrics, aggregate by group and combine several tables. Each lesson builds on concrete business cases (sales, customers, orders) and exercises run in the browser.

What you will be able to do

  • Perform vectorized calculations and filters with NumPy
  • Load a CSV into a DataFrame and run an initial diagnosis
  • Select, filter and sort data with loc, iloc and conditions
  • Create computed columns and work with dates and text
  • Compute metrics by group with groupby, agg and pivot_table
  • Combine several tables with concat and merge while controlling the result

Syllabus: 6 lessons

    • Create NumPy arrays and know their attributes (shape, dtype)
    • Perform vectorized calculations without loops
    • Filter an array with a boolean mask and compute statistics

    ndarray arraysVectorized computationBoolean masks

  1. 02

    pandas: Series, DataFrame and Reading Data

    15 min
    • Create a Series and a DataFrame and understand the role of the index
    • Load a CSV file with read_csv
    • Inspect a dataset: head, shape, info, dtypes, describe

    SeriesDataFrameReading CSV filesInitial exploration

  2. 03

    Select, Filter and Sort

    20 min
    • Select rows and columns with loc and iloc
    • Filter a DataFrame with boolean conditions
    • Sort data and get a ranking

    loc and ilocBoolean filteringSorting

  3. 04

    Create and Transform Columns

    20 min
    • Create computed columns in a vectorized way
    • Recode values with map, np.where and pd.cut
    • Work with dates (.dt) and text (.str)

    Computed columnsRecoding valuesDates with .dtText with .str

  4. 05

    Aggregating: groupby and Pivot Tables

    20 min
    • Compute aggregates by group with groupby
    • Produce several named metrics with agg
    • Build a pivot table with pivot_table

    groupbyMultiple aggregationsPivot tablesCounts

  5. 06

    Combining Tables: merge and concat

    20 min
    • Stack tables with the same structure using concat
    • Join two tables on a key with merge
    • Choose the join type and control the result

    ConcatenationJoinsJoin validation

Final project

Online Shop Sales Analysis

You have three tables simulated in memory (orders, order lines, product reference table with categories). Carry out a complete analysis: loading and diagnosis, controlled joins, creation of metrics (revenue, month, basket bracket), then summaries by category, by month and by channel. Conclude with three quantified recommendations for the sales team.

Deliverables

  • A commented Python notebook or script that runs end to end
  • An initial diagnosis (shape, types, distinct values) of each table
  • Joins with checks on the number of rows and matches (indicator, validate)
  • A KPI table by category (named agg) and a month × channel pivot table
  • A short written summary of three recommendations backed by the figures

Assessment criteria

  • Calculations are exact and verifiable (consistent totals across tables)
  • Operations are vectorized, with no unnecessary loops
  • Joins are controlled and no row is lost or duplicated without explanation
  • Modifications use loc and not chained assignment
  • Result tables are readable (column names, sorting, rounding) and conclusions are justified

Frequently asked questions

Do I need to know NumPy before learning pandas?

No, but a few notions help: pandas is built on NumPy. That is why the first lesson introduces NumPy arrays, vectorization and boolean masks, which you then meet again in pandas.

Which version of pandas is used in the course?

The course uses pandas 3.1. Differences from pandas 2 are pointed out, notably the default str text type and pandas 3's Copy-on-Write mode, which makes chained assignment ineffective: you modify data with loc.

Can pandas replace Excel for data analysis?

For repetitive or large analyses, yes: pandas handles millions of rows and chains steps in a reproducible, automatable way. groupby and pivot_table replace pivot tables, and merge replaces VLOOKUPs.

What level of Python do I need to take this course?

The basics are enough: variables, lists, dictionaries, loops and functions, as covered in the Python Fundamentals course (PY1).

This course, told for your job

Say what you want to be able to do: “Data Analysis with pandas and NumPy” takes its place in your path, with examples from your field. The concepts stay those of the course.

The preview is free, and you can take the courses one at a time without paying. The path only contains lessons from the catalogue.