Capsules

First steps in Python and SQL, with AI

Twelve moves to read a data file, filter, calculate, make a chart, run a simple SQL query and get help from AI without copying blindly

Non-developers: assistants, project managers
Non-developers: assistants, project managers
12 capsules of about a minute
12 capsules of about a minute
Video capsules in JupyterLite, FR and EN, with the exact code to type
Video capsules in JupyterLite, FR and EN, with the exact code to type
Beginner to intermediate
Beginner to intermediate

What you will be able to do

  • Open JupyterLite in your browser and run your first line of Python.
  • Load a CSV file and look at its first rows.
  • Keep only the rows you need, add a calculated column and a total.
  • Total by group and turn it into a chart in one line.
  • Save and download the result.
  • Open a SQLite database, then filter, sort, count and add up in SQL.
  • Ask AI for code, then check it against a number you know.
  • Understand an error message with AI, and fix it.

The method

Everything happens in JupyterLite, on jupyter.org: free, no account, nothing to install. Python with pandas for tables and charts, SQLite for SQL. The code is shown as is, to type line by line; AI comes in at the end, to help, never to copy with your eyes closed. Data 100 % made up.

Module outline

Sequence by sequence, timed.

  1. 01py01 — Open JupyterLite and run your first line.
  2. 02py02 — Load a CSV file.
  3. 03py03 — Keep only the rows you need.
  4. 04py04 — Add a calculated column and a total.
  5. 05py05 — Totals by store.
  6. 06py06 — A chart in one line.
  7. 07py07 — Save and download the result.
  8. 08py08 — Open a SQLite database and read a table.
  9. 09py09 — Filter and sort in SQL.
  10. 10py10 — Count and add up in SQL.
  11. 11py11 — Ask AI for the code, then check it.
  12. 12py12 — Understand an error message with AI.

Capsules

Being filmed

Twelve moves to read a data file, filter, calculate, make a chart, run a simple SQL query and get help from AI without copying blindly

The capsules of this track are written and being filmed. The program above describes each of them.

The habits

  1. 1

    Write the column name exactly as it is in the file.

  2. 2

    The chart shows the same numbers as the table, nothing more.

  3. 3

    Here, files stay in this browser. Download what you want to keep.

  4. 4

    Never put real data into a public AI, and always keep a check number.

  5. 5

    Understand the fix before you apply it.

The prompt library

  • I have a pandas table df with the columns [your columns]. Write one line of Python that gives [the result you want].
  • [the line of code] [the error message] What does this error mean?
  • SELECT [columns] FROM [table] WHERE [amount] > [threshold] ORDER BY [amount] DESC;
  • SELECT [column], COUNT(*) AS n, SUM([amount]) AS total FROM [table] GROUP BY [column] ORDER BY total DESC;

The resources

The resources

Sheets and materials to download or print.

First steps in Python and SQL, with AI

Non-developers: assistants, project managers

Newsletter

Monday's capsule

One skill a week, straight to your inbox. The easiest way to keep learning without thinking about it.

No spam, no reselling. One-click unsubscribe.

Your data stays in the EU. Never sold.

SkillKapsul