# Checking Your Data with assert

assert stops the code with an AssertionError and your message whenever a condition is False, so checks on ranges with between and all, on repeated timestamps and on missing values, gathered in one check_readings function, catch a cleaning step that went wrong every time the cleaning runs.

![Cheat sheet: Checking Your Data with assert](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/bb9a0ef78ea64213bb0f6ebd503ec064.webp)

- Category: Data Analysis
- Level: Journeyman
- Tags: assert, AssertionError, python
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/pandas-checking-data-with-assert-cheat-sheet
