> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exploratory.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Sample

Sample n rows from the data frame (Sample N Rows) or sample n fraction of rows from the data frame (Sample Fraction)

## How to Access This Feature

![](https://mintcdn.com/exploratory-inc/TqmeqBdjk6dsTTLj/en/wrangling/images/command-sample-menu.png?fit=max\&auto=format\&n=TqmeqBdjk6dsTTLj\&q=85\&s=3500c4f5f8aedfcbca12849da5a9e3d4)

### Sample (N Rows)

* Click "+" button and select "Others ..." -> "Sample ..." -> N Rows

### Sample (Fraction)

* Click "+" button and select "Others ..." -> "Sample ..." -> Fraction

## Sample (N Rows)

![](https://mintcdn.com/exploratory-inc/mfFUqJbgNW8Lp3uy/en/wrangling/images/sample-nrows.png?fit=max\&auto=format\&n=mfFUqJbgNW8Lp3uy\&q=85\&s=fe701149cef52d5428a6d84e21493fc0)

1. Enter Sample Number - Number of rows you want to sample the data. (e.g. 10000)
2. Select `Weight Colulmn` (Optional) - Sampling weight. The ratio of probability the row should be chosen. This should be non-negative numeric vector whose size is the number of rows. It's normalized so that the sum of the probability will be 1.
3. Replace Sampled Rows (Options) - The default is FALSE. If it's TRUE, replacement will be executed when sampling.
4. Click "Run" to Sample data frame.

## Sample (Fraction)

![](https://mintcdn.com/exploratory-inc/mfFUqJbgNW8Lp3uy/en/wrangling/images/sample-frac.png?fit=max\&auto=format\&n=mfFUqJbgNW8Lp3uy\&q=85\&s=a82d9ca421fa0f91e10946e0f10fa528)

1. Enter Sample Fraction ratio. It should be a numeric value between 0 and 1. (e.g. 0.4)
2. Select `Weight Colulmn` (Optional) - Sampling weight. The ratio of probability the row should be chosen. This should be non-negative numeric vector whose size is the number of rows. It's normalized so that the sum of the probability will be 1.
3. Replace Sampled Rows (Options) - The default is FALSE. If it's TRUE, replacement will be executed when sampling.
4. Click "Run" to Sample data frame.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.