Python basics for data — flashcards
One card per lesson — 4 in this module. Recall the key points, then check. 4 cards. Click a card to flip, or use the arrow keys and space bar.
Setup and Jupyter notebooks — what are the key points?
Cells share memory and can run in any order · Restart & Run All before trusting or sharing a notebook · import pandas as pd is the convention everything else assumes Read the lesson
Variables and data types — what are the key points?
Python infers types; check them rather than assuming · '10' + '5' concatenates to '105' — numbers arriving as text is the usual cause · int() truncates; use round() to round Read the lesson
Lists and dictionaries — what are the key points?
Lists are zero-indexed and slices exclude the end position · dict.get(key, default) avoids KeyError on a missing key · A dict of lists maps directly onto DataFrame columns Read the lesson
Conditions and loops — what are the key points?
Indentation defines blocks; Python uses and / or / not · Looping over DataFrame rows is usually the wrong approach · Column operations apply to every row at once and run far faster Read the lesson