Lessons › Python
32 free lessons
Python lessons
Python for data analysts, from print() and loops to pandas, groupby, cleaning and charts.
- print()Show text and numbers
- VariablesGive a value a name
- MathsPython as a calculator
- TextJoin and change text
- f-stringsPut values inside text
- ListsMany values in one variable
- len()Count the items
- sum(), min(), max()Total, lowest, highest
- .append()Add to a list
- Loops, step 1Do something for every item
- Loops, step 2Build up an answer
- ComparisonsTrue or False questions
- if and elseMake a decision
- elifMore than two outcomes
- Loops with ifPick items out while looping
- Functions, step 1Name a set of steps
- Functions, step 2Send back an answer with return
- Loading a CSVOpen a table in Python
- Looking at a tableSize, column names, last rows
- Picking a columnOne column by name
- Column totalsSum, average, biggest
- Counting valuesHow many of each
- Filtering, one conditionKeep only matching rows
- Filtering, two conditions& for both, | for either
- New columnsCalculate for every row
- SortingRank and take the top few
- groupby, part 1Totals for each group
- groupby, part 2Averages and counts per group
- Cleaning textSpaces and capitals
- Gaps and duplicatesMissing values and repeated rows
- ChartsBar and line charts
- Automate a reportEverything together