Prepstellar

Data Analysis Fundamentals · Getting started

23 cards

Analysis Workflow and Course Outcomes

Swipe, scroll or use ← →
  1. Start with data, then look at it

    A practical pandas analysis is an ordered loop rather than one isolated command. Knowing the order matters more than knowing any single function, because each stage assumes the one before it has been done.

    The loop begins with acquisition. Start by creating a Series or DataFrame in memory, or by reading tabular data with a pandas reader such as read_csv(). In-memory creation suits small examples and test cases; a reader is how real data arrives.

    1 / 23
  2. Start with data, then look at it

    Then inspect the object before calculating: preview rows, check the Index and column labels, review column types, and obtain a descriptive summary where appropriate.

    Inspection What it tells you
    Preview the first or last rows whether the values look like what you expected
    Read the Index and the column labels what identifies a row, and which variables arrived
    Review the column types whether a number arrived as a number, not as text
    Take a descriptive summary the range and spread of the numeric columns

    Inspection establishes what was actually loaded. Skipping it does not remove the risk, it only postpones it: a column that arrived as text will still produce output, and the output will be wrong in a way nothing flags.

    2 / 23
  3. Quick check

    You have just read a CSV whose contents you have never seen. What comes next?

    1. AInspect its rows, its labels, its dimensions, and its column types

      Right. Inspection establishes what was actually loaded, before any selection or calculation depends on it.

    2. BMerge it with every other table you happen to have available

      Combining unexamined tables carries any loading problem straight into the result.

    3. CWrite it straight back out in a different file format

      Exporting first only moves an unverified table somewhere else.

    3 / 23

  4. Three ways to narrow the data

    Analysis rarely needs the whole table. The next stage narrows the data to the relevant rows and columns, and pandas supports selection by label, selection by position, and Boolean filtering.

    The three are not interchangeable. Each answers a different kind of question, and picking the wrong one is how the right calculation ends up applied to the wrong rows.

    4 / 23
  5. Three ways to narrow the data

    Approach The question it answers Typical use
    By label which named rows and columns do I want? the total column for orders 1001 and 1002
    By position which slots in the current order do I want? the first ten rows of an already sorted table
    By Boolean condition which rows satisfy a test? every order whose total is above 100

    Boolean filtering is the one that carries analytical meaning, because the condition states a rule. Label selection is stable across reorderings, since a label stays with its row. Position selection depends on the current arrangement, so it is the one to treat with care after a sort.

    5 / 23
  6. Quick check

    Which three approaches does pandas offer for narrowing a table to the rows and columns you need?

    1. ASelection by plot colour, by export format, and by workbook name

      Colours, formats, and file names describe output; none of them selects data.

    2. BSelection by package alias, by value type, and by chart legend

      An alias, a type, and a legend describe the setup and the display rather than a subset of rows.

    3. CSelection by label, by position, and by Boolean condition

      Right. Label-based, position-based, and Boolean selection are the three documented ways to narrow data.

    6 / 23

  7. Decide what missing means

    Gaps are normal, and they are not a technical detail: what a gap means is an analytical question. Missing values can be detected with isna(), removed with dropna(), or filled with fillna().

    Those are three different actions, not three names for one automatic answer. The methods provide different actions rather than one automatic answer, and the choice depends on the analytical meaning of the missing observations.

    7 / 23
  8. Decide what missing means

    Action Method When it is the honest choice
    Detect isna() always first: find out how much is missing and where
    Remove dropna() the observation is unusable and dropping it does not bias the result
    Fill fillna() a defensible substitute exists, such as zero for "no sales that day"

    A missing delivery date can mean the parcel has not shipped, or that a feed failed. The first is information worth keeping; the second is a data problem to fix upstream. No method can tell them apart for you, which is why the detection step comes before the decision.

    8 / 23
  9. Quick check

    A column of delivery dates has gaps. Which set of actions matches what pandas offers for missing data?

    1. AJoin with `merge()`, reshape with `stack()`, or export with `to_csv()`

      Those three belong to combining, reshaping, and export; none of them addresses a gap.

    2. BDetect them with `isna()`, remove them with `dropna()`, or fill them with `fillna()`

      Right. Detection, removal, and filling are the three distinct responses, and choosing between them is analytical work.

    3. CCount with `shape`, label with the Index, or convert it with `to_numpy()`

      Counting, labeling, and array conversion describe structure; they do nothing about missing values.

    9 / 23

  10. Keep your progress in the app

    That’s 3 of 9 quick checks. In the app they stay answered, and every lesson remembers where you left off.

  11. Transform for the question you are asking

    Transformation changes values or structure so that the table fits the question. Operations can calculate column or row summaries, apply functions, process strings, reshape tables, and convert suitable values to categorical or time-aware forms.

    Kind of change Example
    Summaries the mean of each column, or a total per row
    Applied functions one calculation run across a column
    String work trim, lower-case, or extract from a text column
    Type conversions text dates to a time-aware type; repeated text to categories

    At each change, inspect the result so that labels, data types, and missingness remain visible. Transformation is where a table quietly stops being what you think it is, and a short look after each step is what keeps that from happening.

    10 / 23
  12. Quick check

    You have just converted a text column into a time-aware type. What should follow?

    1. AInspect the result, so labels, types, and any gaps stay visible

      Right. Checking after each change keeps labels, data types, and missingness visible.

    2. BExport at once, since this conversion cannot fail

      Conversions can produce gaps or unexpected types, so an unverified export carries them onward.

    3. CRepeat that identical conversion on every one of the remaining columns

      Columns hold different kinds of value; one conversion is not a rule for all of them.

    11 / 23

  13. Combine more than one table

    Many analyses need more than one table. Two functions cover the two ways tables come together, and they answer different questions.

    concat() combines pandas objects, while merge() performs SQL-style joins on selected columns. Stacking is not joining: one adds more of the same, the other adds related information alongside what you already have.

    12 / 23
  14. Combine more than one table

    Need Function Result
    Three monthly extracts of the same table, to be treated as one concat() one longer table with the same columns
    Order rows that must carry their customer's attributes merge() one wider table, matched on the shared key

    An orders table and a customers table that share a customer key are the classic case for a merge: the join attaches the customer columns to each order row by matching the key. Concatenating them instead would stack unrelated columns on top of each other and match nothing.

    13 / 23
  15. Quick check

    Two tables share a customer key, and each order row needs its customer's attributes attached. Which function fits?

    1. A`concat()`, which combines pandas objects by stacking them together

      Stacking adds more rows of the same kind; it does not match rows on a shared key.

    2. B`merge()`, which performs a SQL-style join on the shared key

      Right. A SQL-style join on selected columns is what attaches related columns by key.

    3. C`isna()`, which reports where the values are absent

      Detecting gaps is a quality check, not a way to combine two tables.

    14 / 23

  16. Summarize by group

    Once the rows are in one table, most questions are asked per something: per region, per month, per customer. Grouping follows a split, apply, and combine process: split observations using criteria, apply a function to each group, and combine the results.

    1. Split the rows into groups, one per region.
    2. Apply a function to each group independently, such as a sum of the order totals.
    3. Combine the per-group results into one output.

    That is why merging comes first when the grouping key lives in another table. Attach the customer's region to each order with a merge on the customer key, then group by region and aggregate: the join supplies the criterion, and the group operation performs the split, the calculation, and the assembly.

    15 / 23
  17. Quick check

    Orders already carry a region column, and you need one total per region. What does the group operation do?

    1. AIt exports each region to its own file and then reloads them all

      Grouping happens inside the analysis; it is not an export-and-reload cycle.

    2. BIt converts the region labels into an array that carries no labels

      Removing labels would destroy the very criterion the grouping needs.

    3. CIt splits the rows by region, applies the sum, and combines the results

      Right. Split by the criterion, apply the function to each group, and combine the outputs.

    16 / 23

  18. Change the layout, change the frequency

    Two more transformations are easy to confuse because both rearrange a table, yet they answer different questions. Reshaping changes layout, while time-series operations can resample observations to another frequency.

    Need Operation What changes
    Months as columns instead of rows reshaping the layout, not the observations
    Per-second readings expressed per five minutes resampling the time frequency of the observations

    Reshaping moves existing values between the row and column axes. Resampling is arithmetic over time: the observations at the new frequency are computed from the ones at the old. Neither is a substitute for the other, and neither is a way to detect gaps or to name columns.

    17 / 23
  19. Quick check

    Which pairing matches each need to the right capability?

    1. AChange the table's layout by reshaping; change its time frequency by resampling

      Right. Reshaping reorganizes the layout, and resampling converts observations to another frequency.

    2. BChange the table's layout with `isna()`; change its time frequency with `columns`

      `isna()` detects missing values and `columns` holds column labels; neither rearranges a table.

    3. CChange the table's layout by plotting it; change its time frequency using the Index

      Plotting displays a result, and the Index holds row labels rather than converting a frequency.

    18 / 23

  20. Communicate the result, or hand it off

    A result must then be communicated or handed to another system. Pandas can plot a Series or all DataFrame columns, and it can write data to formats such as CSV, Parquet, and Excel.

    Destination Route
    A person reading a chart plot the Series, or all the columns of the DataFrame
    Another tool or a shared store write the table out as CSV, Parquet, or Excel
    19 / 23
  21. Communicate the result, or hand it off

    Export is not the end of reasoning: verify that the output preserves the labels, types, grain, and structure the consumer needs. One row per order and one row per region are different tables, and a file that silently ships the wrong grain is worse than no file at all.

    For a CSV of unknown quality, the verifiable order is:

    1. Read the file.
    2. Inspect the labels and column types.
    3. Decide what to do about the missing values, and do it.
    4. Verify the cleaned result.
    5. Export it.

    Each step depends on the previous one. Exporting before inspecting, or filling every gap before asking what the gaps mean, produces a file nobody can defend.

    20 / 23
  22. Quick check

    The regional totals are ready and the finance team needs them. Which action belongs to this stage?

    1. ADiscard the labels first, and afterwards ask what structure the team needs

      The labels are part of what the consumer needs; dropping them before asking loses the structure.

    2. BReplace the earlier inspection with one final calculation on unchecked types

      A final calculation on unverified types does not communicate anything, and it reintroduces the risk inspection removed.

    3. CPlot the result, or write it to a format such as CSV, Parquet, or Excel

      Right. Plotting communicates the result visually, and the writers hand the data to another system.

    21 / 23

  23. What you will be able to do

    By the end of this course, you will be able to load and inspect labeled tabular data; select, clean, and transform it; calculate grouped and windowed results; combine datasets; work with dates, times, and categories; create plots and styled tables; and organize an exploratory workflow with explicit quality and scale decisions.

    • Follow the sequence: acquire or create, inspect, select and clean, transform, combine and summarize, then communicate or export.
    • Use concat() for combining pandas objects and merge() for SQL-style joins on columns.
    • A group operation splits data, applies a function, and combines the results.
    • The course develops an end-to-end tabular analysis workflow rather than teaching isolated commands. Later blocks add the decision rules and edge cases that reliable work needs.
    22 / 23
  24. Quick check

    A learner wants one path that starts with tabular input, covers quality and combination decisions, and ends with communicated results. What does this course provide?

    1. AFile reading alone, with no selection, no quality checks, and no outputs

      Reading is only the first stage; the workflow continues through selection, cleaning, and output.

    2. BAn end-to-end workflow, from loading and inspection through to communication

      Right. The course follows the full journey and connects each operation to the checks and decisions around it.

    3. CA plotting-only path that assumes every table already arrives clean and combined

      Plotting is the last stage of the loop, and it assumes the cleaning and combining that come before it.

    23 / 23

  25. 9 quick checks · then the test

    In the app, finishing the quick checks opens this lesson’s 10-question test, and the ones you miss come back exactly when you’re about to forget them.

The whole course, on your phone

Lessons you can read, audio you can listen to on the way to work, and practice that remembers what you got wrong.