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

# Limit

> Reduce the number of rows in your data set

The Limit tool can be used to reduce the size of your dataset. It can be useful if you're working with large datasets and want to increase the performance while you're building your model. Once you're model is ready for production, you can always remove the Limit tool again to ensure that your model is using the full dataset.

### Configuration

<Steps>
  <Step title="Input Row Limit" stepNumber={1} titleSize="p">
    All you have to do is input the number of rows you would like to reduce you
    dataset to.
  </Step>

  <Step title="Group by (optional)" stepNumber={2} titleSize="p">
    If you want to limit the dataset within a group, you can select the group by column(s) here.
  </Step>
</Steps>

### Example: Limiting within a group

Imagine we have a dataset that looks like this:

<img className="rounded-md" src="https://mintcdn.com/less-51/qnh8gNMWMbLC5eFp/images/tools/limit/Before.png?fit=max&auto=format&n=qnh8gNMWMbLC5eFp&q=85&s=7f1fc11143cec8de585e3d807e17df9d" width="1114" height="338" data-path="images/tools/limit/Before.png" />

We want to limit the dataset to 1 row per group (true and false in the *bool\_col* column). We can do this by selecting the group by column and then selecting the limit tool.

<img className="rounded-md" src="https://mintcdn.com/less-51/qnh8gNMWMbLC5eFp/images/tools/limit/After.png?fit=max&auto=format&n=qnh8gNMWMbLC5eFp&q=85&s=af1deb392f7e71a9dd0e5a6ab342e7ab" width="2194" height="1556" data-path="images/tools/limit/After.png" />
