> For the complete documentation index, see [llms.txt](https://learn.evidentlyai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.evidentlyai.com/ml-observability-course/module-2-ml-monitoring-metrics/data-quality-code-practice.md).

# 2.5. Data quality in ML \[CODE PRACTICE]

{% embed url="<https://www.youtube.com/watch?v=_HKGrW2mVdo&list=PL9omX6impEuOpTezeRF-M04BW3VfnPBRF&index=11>" %}

**Video 5**. [Data quality in ML \[CODE PRACTICE\]](https://www.youtube.com/watch?v=_HKGrW2mVdo\&list=PL9omX6impEuOpTezeRF-M04BW3VfnPBRF\&index=11), by Emeli Dral

In this video, we walk you through the code example of data quality evaluation using [Evidently](https://github.com/evidentlyai/evidently) Reports and Test Suites.

**Want to go straight to code?** Here is the [example notebook](https://github.com/evidentlyai/ml_observability_course/blob/main/module2/data_quality.ipynb) to follow along.

Here is a quick refresher on the Evidently components we will use:

* **Reports** compute and visualize 100+ metrics in data quality, drift, and model performance. You can use in-built report presets to make visuals appear with just a couple of lines of code.
* **Test Suites** perform structured data and ML model quality checks. They verify conditions and show which of them pass or fail. You can start with default test conditions or design your testing framework.

**Outline**:\
[00:00](https://www.youtube.com/watch?v=_HKGrW2mVdo\&list=PL9omX6impEuOpTezeRF-M04BW3VfnPBRF\&index=11\&t=0s) Create a working environment and import libraries\
[01:30](https://www.youtube.com/watch?v=_HKGrW2mVdo\&list=PL9omX6impEuOpTezeRF-M04BW3VfnPBRF\&index=11\&t=90s) Prepare reference and current dataset\
[05:20](https://www.youtube.com/watch?v=_HKGrW2mVdo\&list=PL9omX6impEuOpTezeRF-M04BW3VfnPBRF\&index=11\&t=320s) Run data quality Test Suite and visualize the results\
[09:30](https://www.youtube.com/watch?v=_HKGrW2mVdo\&list=PL9omX6impEuOpTezeRF-M04BW3VfnPBRF\&index=11\&t=570s) Customize the Test Suite by specifying individual tests and test conditions\
[13:20](https://www.youtube.com/watch?v=_HKGrW2mVdo\&list=PL9omX6impEuOpTezeRF-M04BW3VfnPBRF\&index=11\&t=800s) Build and customize data quality Report

That’s it! We evaluated data quality using Evidently Reports and Test Suites and demonstrated how to add custom metrics, tests, and test conditions to the analysis.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://learn.evidentlyai.com/ml-observability-course/module-2-ml-monitoring-metrics/data-quality-code-practice.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
