Set difference
Set difference is the set of elements that belong to one set but not to another.
Build Python Web Apps with Streamlit
A delta is the difference between a metric's value in a main period and its value in a comparison period.
- How it is used
- Compares dashboard metrics across main and comparison date ranges to show change alongside the current value.
- How deep it goes
- Explains separate filtering, percentage calculation, formatting, and display, while stopping short of broader statistical interpretation.
- Examples
- Uses August and July sales, filtered dataframes, percentage formatting, and a metric bar as concrete examples.
- What you can do after
- Build it from scratch by calculating and formatting percentage deltas for Streamlit metric bars.
Read how Build Python Web Apps with Streamlit explains set difference →
Secrets of the JavaScript Ninja, Second Edition
The set of elements in one set that are not in another set.
- How it is used
- Filters a collection to retain elements absent from another set.
- How deep it goes
- Defines the operation and demonstrates it with JavaScript, without developing a formal treatment.
- Examples
- Demonstrates filtering ninjas to exclude those who are also samurai.
- What you can do after
- Apply set difference with JavaScript Set, spread, filter, and has.
Read how Secrets of the JavaScript Ninja, Second Edition explains set difference →
Related concepts
- setuses · A set is a collection of unique elements in which membership is determined by whether an element is present, not by duplicate occurrences.
- set intersectioncontrasts with · Set intersection is the set of elements that belong to every one of two or more sets.
- setdiffimplemented by · setdiff is a Julia function that returns the elements present in one collection but absent from one or more other collections.
- st.metricused by · st.metric is a Streamlit display function that presents a labeled metric value and optionally its change from a reference value.
- set operationkind of · A set operation combines, compares, or transforms sets according to the membership of their elements.
- disjalternative to · disj is a Clojure function that returns a set with one or more specified elements removed.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

