<commit_before>---
title: How to create and edit Expectations with the User Configurable Profiler
---

import Prerequisites from '../../guides/connecting_to_your_data/components/prerequisites.jsx'
import TechnicalTag from '@site/docs/term_tags/_tag.mdx';

This guide will help you create a new <TechnicalTag tag="expectation_suite" text="Expectation Suite" /> by profiling your data with the User Configurable <TechnicalTag tag="profiler" text="Profiler" />.

<Prerequisites>

- [Configured a Data Context](../../tutorials/getting_started/tutorial_setup.md).
- Configured a [Datasource](../../tutorials/getting_started/tutorial_connect_to_data.md)

</Prerequisites>

:::note

The User Configurable Profiler makes it easier to produce a new Expectation Suite by building out a bunch of <TechnicalTag tag="expectation" text="Expectations" /> for your data.

These Expectations are deliberately over-fitted on your data e.g. if your table has 10,000 rows, the Profiler will produce an Expectation with the following config:

```json
{
      "expectation_type": "expect_table_row_count_to_be_between",
      "kwargs": {
        "min_value": 10000,
        "max_value": 10000
      },
      "meta": {}
    }
```

Thus, the intention is for this Expectation Suite to be edited and updated to better suit your specific use case - it is not specifically intended to be used as is.

:::

:::note

You can access this same functionality from the Great Expectations <TechnicalTag tag="cli" text="CLI" /> by running

```console
great_expectations suite new --profile
```

If you go that route, you can follow along in the resulting Jupyter Notebook instead of using this guide.

:::


## Steps

### 1. Load or create your Data Context

Load an on-disk <TechnicalTag tag="data_context" text="Data Context" /> via:

```python
from great_expectations.data_context.data_context import DataContext

context = DataContext(<commit_msg>[DOCS] DOC-308 update CLI command in docs when working with RBPs instead of Data Assistants (#6222)<commit_after>---
title: How to create and edit Expectations with the User Configurable Profiler
---

import Prerequisites from '../../guides/connecting_to_your_data/components/prerequisites.jsx'
import TechnicalTag from '@site/docs/term_tags/_tag.mdx';

This guide will help you create a new <TechnicalTag tag="expectation_suite" text="Expectation Suite" /> by profiling your data with the User Configurable <TechnicalTag tag="profiler" text="Profiler" />.

<Prerequisites>

- [Configured a Data Context](../../tutorials/getting_started/tutorial_setup.md).
- Configured a [Datasource](../../tutorials/getting_started/tutorial_connect_to_data.md)

</Prerequisites>

:::note

The User Configurable Profiler makes it easier to produce a new Expectation Suite by building out a bunch of <TechnicalTag tag="expectation" text="Expectations" /> for your data.

These Expectations are deliberately over-fitted on your data e.g. if your table has 10,000 rows, the Profiler will produce an Expectation with the following config:

```json
{
      "expectation_type": "expect_table_row_count_to_be_between",
      "kwargs": {
        "min_value": 10000,
        "max_value": 10000
      },
      "meta": {}
    }
```

Thus, the intention is for this Expectation Suite to be edited and updated to better suit your specific use case - it is not specifically intended to be used as is.

:::

:::note

You can access this same functionality from the Great Expectations <TechnicalTag tag="cli" text="CLI" /> by running

```console
great_expectations suite new --profile rule_based_profiler
```

If you go that route, you can follow along in the resulting Jupyter Notebook instead of using this guide.

:::


## Steps

### 1. Load or create your Data Context

Load an on-disk <TechnicalTag tag="data_context" text="Data Context" /> via:

```python
from great_expectations.data_context.data_context import DataContext

context = DataContext(
{'fraction_non_alphanumeric': 0.09751142712036567, 'fraction_numerical': 0.009903504316912138, 'mean_word_length': 4.44060773480663, 'pattern_counts': {'":': 10, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4336021', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1124, 'n_words': 427}