Python Data Analysis for Beginners
Walk through a library reservation example to define a question, check the rows, calculate pickup rates, and explain the limits of the result.
6 min readClean inputs, ask precise questions of a dataset, and produce reports others can verify.
Walk through a library reservation example to define a question, check the rows, calculate pickup rates, and explain the limits of the result.
6 min readCompare the standard library, pandas, SQLite, notebooks, and Matplotlib using a repair-job reporting example.
6 min readUse pandas to flag blanks and invalid values separately, choose a duplicate key, and check how cleaning changes the dataset.
6 min readSee what a checkable analysis report includes, with a worked example covering denominators, missing records, and reproducible methods.
5 min readPractice seven analyst questions with worked reasoning on weighted averages, duplicate join matches, missing data, streaming, and validation.
6 min readRead a small UTF-8 file with pathlib, process a large file line by line, and troubleshoot missing paths, decoding errors, or empty reads.
5 min readChoose the right write mode, control encoding and line endings, and publish a complete replacement without truncating an existing report first.
4 min readDiagnose UnicodeDecodeError and UnicodeEncodeError, identify the source encoding, and handle UTF-8 byte order marks without dropping data.
5 min readUse pathlib to list immediate files, match a pattern recursively, filter by type, and sort results for a repeatable batch.
3 min readChoose between date and datetime, parse ISO and custom formats, calculate durations, and avoid mixing calendar dates with timestamps.
4 min readConvert aware timestamps, distinguish offsets from named zones, and handle times that repeat or disappear during clock changes.
4 min readCount labels with collections.Counter, get the most common items, break ties consistently, and add counts across batches.
4 min readCalculate averages with Python’s statistics module, handle empty groups, and choose the right denominator for a weighted mean.
4 min readDisplay two decimal places with an f-string, apply an explicit tie rule with Decimal.quantize, and decide whether to round before or after summing.
3 min readParse a JSON array, select records by field value, and distinguish an empty result from missing, null, or malformed data.
3 min readUse isoformat and fromisoformat to round-trip event timestamps, keep the UTC offset, and validate the format the receiver expects.
4 min readUse set_index for label lookup and alignment. See how duplicates, row order, loc, iloc, and CSV export affect the result.
4 min readParse a known format with pandas.to_datetime, count invalid dates separately from missing values, and handle UTC and local timestamps.
3 min readChoose storage for a Python project by comparing query needs, transaction rules, concurrent writers, and who will restore the data.
4 min readUse Python’s sqlite3 to commit related writes together, test rollback on a failed insert, and close the connection separately.
4 min readRun a grouped SQLite query from Python, compare COUNT(*) and COUNT(column), and choose when to filter rows or groups.
4 min readCreate a consistent copy with sqlite3.Connection.backup, reopen it, and verify both database integrity and expected application records.
4 min read