Introduction
We use sample() to pick random rows from a table. This helps us look at a small, random part of big data.
You want to check a few random records from a large dataset to understand its structure.
You need to create a smaller dataset for testing or training a model.
You want to randomly select data points for a quick quality check.
You want to split data randomly for experiments or validation.
You want to shuffle data rows before analysis.