See the logic of two Python scripts before you run them. Clean a messy dataset and summarize it, then step through a local agent that answers questions by calling Python functions. This page runs in your browser and sends none of your choices anywhere. Like every page on this site, it counts page views with the Foundation's self-hosted metrics, which use no cookies. The scripts in the scripts folder do the same work for real.
Made-up library loans, saved as loans.csv. It has stray spaces, inconsistent capitals, numbers with commas, blanks and duplicates. Switch cleaning steps off to see what goes wrong.
| Group | Value |
|---|
This code updates as you change the controls above. The same logic is in wrangle.py and wrangle_pandas.py.
An agent is a model, some tools, and a loop. Pick a question and click Next. The tool results are computed from the cleaned data. The model's replies are scripted for teaching: real models vary.
Open a terminal in the scripts folder. You need Python 3.9 or newer.
This is a teaching tool. It mirrors the scripts but does not run Python. Dedicated to the public domain under CC0 1.0.