Next →

What is a Set?

A set is a collection of unique items — it automatically removes duplicates. Sets are unordered and use curly braces {}.

Example:

fruits = {"apple", "banana", "cherry", "apple"}
# Even though "apple" appears twice, the set stores it once.

Basic Set Operations

Why Sets Matter in Analytics

Sets are useful for finding unique values in a dataset — for example, unique customers, product categories, or error codes.