pandas groupby explained: split, apply, combine
One idea, split-apply-combine, explains every pandas groupby. Totals, named agg, two-column groups, transform and filter, with diagrams, real output and four mistakes to avoid.
Practical ideas for learning data skills.
One idea, split-apply-combine, explains every pandas groupby. Totals, named agg, two-column groups, transform and filter, with diagrams, real output and four mistakes to avoid.
The right Git undo depends on one thing: where the change is now. Discard edits, unstage files, undo local and pushed commits, and recover lost work with git restore, reset, revert and reflog.
GROUP BY loses the rows; window functions keep them. Learn OVER, PARTITION BY, ROW_NUMBER, RANK, DENSE_RANK and running totals with diagrams and exact results on the SQL Server practice dataset.
WHERE filters rows before grouping, HAVING filters groups after. One rule, a diagram of the clause order, and the common mistake that makes cities with zero matches vanish from a report.
Every join answers one question: what happens to rows with no match? INNER, LEFT, RIGHT and FULL OUTER JOIN, one picture each, with exact results you can run on the SQL Server practice dataset.
One table, three different counts. Learn what COUNT(*), COUNT(column) and COUNT(DISTINCT) really count, and avoid the three traps that silently break reports.
Ten runnable Python cleaning one-liners, with exact outputs and the edge cases to check before using them on real data.
Five SQL Server mistakes that run without an error but return the wrong answer, each explained with a diagram and a fix you can run on the practice dataset.
Read customer names from the shared SQL Server practice database with SELECT and FROM.