Data & Analytics

Python + Data Analytics

Use Python to clean, summarise, and chart a table of real questions.

★★★★★4.8 · Based on 86 learners88 lessons · 22 hr

Python + Data Analytics uses Python for tables: load a file, clean columns, summarise groups, and draw a chart that answers something. Basic Python is assumed. The course stays with analysis you can explain, not a tour of every library.

Course syllabus

  1. 01. Open a table

    • A csv beside the script

      The file has a header row and one record per line.

      15 min
    • Loading a file into a table

      pandas reads the file into rows and named columns.

      17 min
    • How many rows and columns

      Shape tells you the size before you trust a sample.

      13 min
    • The first rows

      Head is a sample, and it can hide a bad row further down.

      16 min
    • The column names as they arrived

      You see the labels before you rename anything.

      18 min
    • A path the script can open

      The path is relative to where you run the file, or it is absolute on purpose.

      14 min
    • What the load guessed

      pandas picked types, and some of those picks will be wrong.

      18 min
    • The question this table is for

      You write the question before you add a calculation.

      12 min
  2. 02. Look before you calculate

    • The type of each column

      A quick list of dtypes, so a number hiding as text shows up.

      17 min
    • Pick a column by its name

      You select one series and look at it alone.

      15 min
    • How often each category appears

      Value counts on the column that groups the question.

      16 min
    • Min, max, and median

      The spread of a numeric column, before any average you might quote.

      13 min
    • A column that looks numeric and is not

      Commas, currency marks, or a word will block the math.

      15 min
    • Describe is a summary, not a finding

      It tells you range and count so you can choose the next check.

      17 min
    • A sample is not the file

      You also count how many rows fail a condition.

      13 min
    • Name the column the question needs

      The cleaning has a target.

      16 min
  3. 03. Types and missing values

    • Types, missing values, and dates

      A column has to be a real type, with gaps marked, before you group or chart it.

      18 min
    • Turn numeric text into numbers

      After you remove characters that are not part of the number, the column can be added.

      14 min
    • Missing is not zero

      A blank stays missing unless you have a reason to fill it.

      18 min
    • Count the blanks in each column

      The count tells you whether the column can support the question.

      12 min
    • Drop a row only for a reason you can say

      You record why those rows left the table.

      17 min
    • Fill a gap only when the fill is true

      A zero or a category is a claim, and you should be able to defend it.

      15 min
    • A blank category

      You give it a visible label in the counts, or you leave it missing.

      16 min
    • Set the type after you have looked

      Conversion comes after the sample, not before.

      13 min
  4. 04. Dates you can sort

    • Parse the date column

      A string becomes a date, and failures stay visible.

      15 min
    • A format that did not parse

      Those cells are missing dates, and you count them.

      17 min
    • Pull year or month

      A monthly question needs a month column.

      13 min
    • Limit the table to the period

      Filter to the dates the question named.

      16 min
    • Sort by the date

      The rows run in time before you read a sequence.

      18 min
    • Do not invent a timezone

      If the file has no zone, you do not add one.

      14 min
    • A date that cannot belong

      A future date or a distant past gets a look before it enters a total.

      18 min
    • The period you will name in the note

      The start and the end come from the column, not from memory.

      12 min
  5. 05. Rows the question needs

    • Filter on one column

      Keep the rows that match the condition you wrote down.

      17 min
    • Two conditions at once

      You decide whether both must be true, or either.

      15 min
    • A row that would distort the total

      A test record or a cancelled order, removed for a reason you can say.

      16 min
    • Keep the full table

      The filter assigns a new table and leaves the original.

      13 min
    • Count before and after

      The two lengths tell you how much the filter removed.

      15 min
    • A filter that keeps nothing

      You check the condition before you chart an empty frame.

      17 min
    • The question chooses the filter

      You do not drop rows to make the chart calmer.

      13 min
    • Name the filtered table

      Later steps use that name, so the scope stays obvious.

      16 min
  6. 06. Columns you calculate

    • A column from other columns

      Amount and count become a rate, and the line shows the formula.

      18 min
    • Name the unit in the column

      Dollars, minutes, or a share, so the chart is not a bare number.

      14 min
    • A yes or no flag

      A condition becomes a boolean column you can count.

      18 min
    • Bins for a number

      Ranges you chose, with edges you can explain.

      12 min
    • Leave the source column unchanged

      The new column sits beside the original.

      17 min
    • A formula that produced missing values

      You find the rows where an input was blank.

      15 min
    • Round when you display

      The stored value keeps its precision for the next calculation.

      16 min
    • The column the chart will use

      You choose it here, before you open a plotting library.

      13 min
  7. 07. Group the rows

    • Group and aggregate

      Rows collapse to one line per category, with a total or a count.

      15 min
    • Group by a single column

      One category, and the measure beside it.

      17 min
    • Sum and count together

      The total without the count is easy to misread.

      13 min
    • A mean next to its count

      A high average on two rows is not the same as one on two hundred.

      16 min
    • Group by two columns

      Category and month, when the question needs both.

      18 min
    • Sort the summary

      The table you will read is ordered by the measure or by time.

      14 min
    • A group with a single row

      You notice it before you treat it as a solid average.

      18 min
    • The summary is its own table

      You name it, and you do not confuse it with the row-level file.

      12 min
  8. 08. A comparison with a count

    • A total and its share of the whole

      The part and the percent come from the same summary.

      17 min
    • This period against the previous one

      Both periods use the same filter and the same measure.

      14 min
    • One category against the rest

      The comparison names which rows sit in the rest.

      15 min
    • Rank the groups

      The order is by the measure, and ties stay visible.

      12 min
    • A difference you can say in words

      The gap has a unit and both sides.

      14 min
    • Percent of a column you can point at

      The denominator is the total you mean.

      16 min
    • A comparison the file cannot support

      If a column is missing, you do not imply the result.

      12 min
    • The number that will lead the note

      You copy it from the summary table.

      15 min
  9. 09. One chart

    • A chart with a sentence

      The title is the claim, and the picture may only support that claim.

      18 min
    • A bar chart for categories

      Lengths compare the groups from the summary.

      13 min
    • A line for a measure over time

      The horizontal axis is the month or the date you parsed.

      17 min
    • Label the axes in words

      The unit is on the chart.

      11 min
    • A second series needs a reason

      If it is not part of the sentence, it stays off the chart.

      16 min
    • Show the count when a bar could mislead

      A tall mean on a tiny group is paired with the number of rows.

      14 min
    • Write the image next to the note

      The file has a name you can cite.

      15 min
    • Skip a chart that does not change the claim

      If the table already says it, you do not add a decoration.

      12 min
  10. 10. The analysis note

    • A short analysis note

      The question, what you did, what you found, and what you did not check.

      14 min
    • The question is the first line

      A reader knows the job before the method.

      16 min
    • Name the file and the filter

      Which rows entered the result.

      12 min
    • The finding in a short paragraph

      The number, the comparison, and the unit.

      15 min
    • Refer to the chart by its claim

      The note states the claim, and the chart is the evidence.

      18 min
    • Say what you did not check

      A column you skipped, a period you excluded, or duplicates you only sampled.

      13 min
    • Take the number from the table

      You do not retype it from memory.

      17 min
    • Written for someone without the notebook

      The note stands without your session open.

      11 min
  11. 11. From the file to the note

    • Start from the csv

      The same path you would hand to someone else.

      16 min
    • Load it again from the top

      The script does not depend on leftover variables.

      14 min
    • Clean the columns the question uses

      Types, blanks, and dates for those columns.

      15 min
    • Filter, then group

      The summary matches the scope you will write down.

      12 min
    • Draw the one chart

      The claim, and a file name.

      14 min
    • Write the note from those outputs

      Question, scope, finding, and the limit.

      16 min
    • Run the script from top to bottom

      It produces the summary and the image, and it does not stop on an error.

      12 min
    • The files you would send

      The note, the chart, and the script that made them.

      15 min

Lecture videos stay with the course. Playback for enrolled students will open once payments are available. Video links are not published on this page.