English
English ⌄
Aifeders

AIFEDERS LEARNING GUIDE

Learn Streamlit with a Python Sales Dashboard Project

A small data app is a useful bridge between writing Python scripts and sharing an analysis someone else can explore. This project turns a fictional US stationery sales file into a Streamlit dashboard. The practice files include deliberate mistakes and exact expected results, so you can check the data work before spending time on charts. No customer records or paid data service are involved.

By Aifeders

Free practice files

Original Aifeders exercises with fictional data. Start with the instructions, then compare your result with the supplied checks.

Choose a starting point you can explain

You should be comfortable with functions, conditions, lists and reading a file. If those are unfamiliar, start with the Python learning path. For this app, define three outputs: accepted order count, units sold and sales value in USD. One accepted row represents one order containing one product; this simplified model would need changing for orders with multiple product lines.

A useful Streamlit course should help you load a file, display a table, add a widget and understand script reruns. Compare the stated edition and package versions with the documentation you use. A course title alone cannot confirm upload handling, deployment coverage or exercise files.

Validate the sample before drawing a chart

Download the sales CSV, instructions and expected results from the practice files box. Keep the original unchanged. Read the file with a CSV parser, retain each input row number and build separate accepted and rejected tables. Check duplicate order IDs, real YYYY-MM-DD dates, permitted state codes, positive whole-number units and positive prices with at most two decimal places, in the order specified in the instructions.

The four permitted codes are CA, TX, NY and WA because this exercise covers those states; they are not a complete list of US state codes. Calculate each line value using units multiplied by unit price. Use decimal arithmetic or integer cents for these monetary checks. Do not add tax, shipping or a currency conversion that the input does not contain.

  • Reconcile 15 input rows with 10 accepted orders and 5 rejected rows.
  • Confirm 24 accepted units and USD 247.00 in sales.
  • Check state totals: CA 86.00, TX 83.00, NY 30.50 and WA 47.50 USD.
  • Show the rejection reason and original row number instead of silently dropping mistakes.

Make filters and reruns predictable

Show the cleaned table first, then add a state selector and calculate all visible totals from that same filtered table. Selecting CA should produce three orders, nine units and USD 86.00. Display an explicit empty state if a filter has no matching records. Label dates and currency clearly; US context does not make an ambiguous date or an unlabelled dollar amount safe to interpret.

Streamlit reruns the script when users interact with widgets. Learn what is recomputed and what needs to persist between interactions. Session State belongs to a viewing session and resets on a browser refresh. Caching has different behavior: cached values can be shared across sessions. Use this public fictional file for practice, and do not assume a cache isolates private uploads.

Finish with evidence you can repeat

Reset the filter and recover the original totals. Load the same file twice and confirm that orders are not appended a second time. Include the date range and the definition of sales value beside the chart. Save a short project note recording your Python and Streamlit versions, the validation rules and the results you checked.

Before sharing an app, check the hosting requirements and keep any future credentials outside source control using the host’s supported secret storage. This exercise needs no API key. Use unfinished steps to compare courses: data cleaning, widget behavior, testing or deployment. The supplied text and CSV files can be inspected without installing packages; building the app requires your own Python and Streamlit environment.

Explore Streamlit courses on Aifeders

These are matching published catalog listings, not a ranking or an endorsement. Check the edition, course language, prerequisites and access details on each resource page.

Official documentation