liveBook · Manning

Set difference

Set difference is the set of elements that belong to one set but not to another.

How 2 Manning books explain it

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

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.