Data · 4 steps

Take a random sample or a train and test split

Mark a random sample of rows, or split the rows into a training set and a test set, with a seed so it can be repeated.

Step by step

  1. Open Random sample or split

    Click Data in the menu bar; under Tools choose Random sample or split….

    Random sample or split
  2. Choose what to make and how many

    Choose Random sample of rows (it adds a true/false column marking the sampled rows) or Train and test split (a column saying Train or Test for each row; the size you give is the size of the test set). Give the size in percent of the rows or as a number of rows.

  3. Keep the seed

    Seed (same seed, same rows) is shown and editable: write it down to draw the same rows again. Name the new column and press Add column.

  4. Use the sample

    Filter or exclude on the new column to work with the sample: see Analyze only the rows you filtered.

What you should see

A new column marking each row, and a message naming the seed used.

Common problems

The sample changed when you drew it again.

Use the same seed as before.

Ask Oobi

Type one of these into Ask Oobi beside your data:

  • How do I take a random sample of 10% of my rows?
  • How do I make a train and test split?

Last reviewed November 16, 2026.

Report an unclear step