pySohila’s learning labPYTHON / FIELD GUIDE 01

Work with real shapes of data / CORE PATH

Comparisons & branching

Branch on explicit conditions and keep unknown values distinct.

3h planning budget · Sohila Khaled Abbas · Reviewed 2026-11-01

Translate a Power Query conditional column or SQL CASE into readable Python.

Understand the idea

Branch on explicit conditions and keep unknown values distinct. Translate a Power Query conditional column or SQL CASE into readable Python.

Work through the practice with a tiny fixture, predict the result before running it, and record one boundary case. Use the exit check as evidence before moving on.

What to learn

A small original example

def amount_status(value):
    if value is None:
        return "missing"
    if value < 0:
        return "invalid"
    return "zero" if value == 0 else "valid"

Practice on your own data

Task 07: label missing, negative, zero and positive amounts.

Practice this lesson in the Python lab →

EXIT CHECK

None → missing; -1 → invalid; 0 → zero; 1 → valid.

Common pitfalls

Prerequisites

Operators & computation

Boot.dev chapter 7 · 02:27:43 ↗

Video and playlist companions

Choose one explanation for the concept, then attempt the practice. These are topic mappings, not a claim that every linked lesson covers every outcome.

Boot.dev · Python for Beginners

Loads YouTube on request. Open on YouTube ↗ if the owner restricts embedding.

كورس Python منحة ITI

Loads YouTube on request. Open on YouTube ↗ if the owner restricts embedding.

Sources and further reading

Track progress on this topic → · Markdown source ↗