<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Omar Abdelfattah Alshafai</title>
    <description>The latest articles on DEV Community by Omar Abdelfattah Alshafai (@omar_alshafai).</description>
    <link>https://dev.to/omar_alshafai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4027892%2Ff1a9a7e0-6055-4a91-8312-dc9d96da636a.jpg</url>
      <title>DEV Community: Omar Abdelfattah Alshafai</title>
      <link>https://dev.to/omar_alshafai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/omar_alshafai"/>
    <language>en</language>
    <item>
      <title>Stop Writing .isnull() — Audit Your Dataset in One Line with OMR</title>
      <dc:creator>Omar Abdelfattah Alshafai</dc:creator>
      <pubDate>Thu, 16 Jul 2026 13:06:51 +0000</pubDate>
      <link>https://dev.to/omar_alshafai/stop-writing-isnull-audit-your-dataset-in-one-line-with-omr-4l91</link>
      <guid>https://dev.to/omar_alshafai/stop-writing-isnull-audit-your-dataset-in-one-line-with-omr-4l91</guid>
      <description>&lt;p&gt;Every time I start a new data project, I write the same boilerplate:&lt;/p&gt;

&lt;p&gt;python&lt;br&gt;
df.isnull().sum()&lt;br&gt;
df.duplicated().sum()&lt;br&gt;
df.dtypes&lt;br&gt;
df.describe()&lt;br&gt;
df[df['age'] &amp;lt; 0]&lt;/p&gt;

&lt;h1&gt;
  
  
  ... 40 more lines
&lt;/h1&gt;

&lt;p&gt;After doing this for the hundredth time, I built OMR (Omni Data Refinement) — a Python library that replaces all of that with a single call.&lt;/p&gt;

&lt;p&gt;What is OMR?&lt;br&gt;
OMR is an open-source Python framework for dataset quality, validation, profiling, and monitoring. Think of it as a health check for your data — before you do any ML, EDA, or transformation, you should know how healthy your data actually is.&lt;/p&gt;

&lt;p&gt;Installation&lt;br&gt;
bash&lt;br&gt;
pip install omni-data-refinement&lt;br&gt;
Only needs pandas, numpy, and rich. No cloud, no LLMs.&lt;/p&gt;

&lt;p&gt;The Core Feature: Health Score&lt;br&gt;
python&lt;br&gt;
import pandas as pd&lt;br&gt;
from omr import Dataset&lt;br&gt;
df = pd.read_csv("your_data.csv")&lt;br&gt;
report = Dataset(df).health()&lt;br&gt;
print(report.score)  # e.g. 87/100&lt;br&gt;
You get a 0-100 quality score covering 5 dimensions:&lt;/p&gt;

&lt;p&gt;Pillar  What it checks&lt;br&gt;
Completeness    Missing values&lt;br&gt;
Uniqueness  Duplicates&lt;br&gt;
Consistency Type mismatches&lt;br&gt;
Validity    Value ranges and format rules&lt;br&gt;
Conformity  Schema adherence&lt;br&gt;
Auto-Cleaning&lt;br&gt;
python&lt;br&gt;
dataset = Dataset(df)&lt;br&gt;
dataset.clean()&lt;br&gt;
dataset.explain_changes()  # See exactly what was fixed&lt;br&gt;
OMR auto-resolves missing values, duplicates, and type mismatches — and gives you a full transformation log so nothing is a black box.&lt;/p&gt;

&lt;p&gt;Schema Validation&lt;br&gt;
python&lt;br&gt;
from omr import schemas&lt;br&gt;
schema = {&lt;br&gt;
    "age":    schemas.PositiveInteger(max=120),&lt;br&gt;
    "salary": schemas.PositiveFloat(min=10000),&lt;br&gt;
    "status": schemas.OneOf("active", "inactive"),&lt;br&gt;
    "email":  schemas.Email()&lt;br&gt;
}&lt;br&gt;
dataset.validate(schema)&lt;br&gt;
Drift Detection&lt;br&gt;
Compare your current dataset against production or a previous version:&lt;/p&gt;

&lt;p&gt;python&lt;br&gt;
prod_dataset = Dataset(pd.read_csv("prod_data.csv"))&lt;br&gt;
dataset.compare(prod_dataset)&lt;br&gt;
Uses PSI, KS Test, and JS Divergence under the hood.&lt;/p&gt;

&lt;p&gt;Statistical Analysis&lt;br&gt;
python&lt;br&gt;
dataset.analyze()&lt;/p&gt;

&lt;h1&gt;
  
  
  Detects: outliers, multicollinearity, skewness, class imbalance, zero variance
&lt;/h1&gt;

&lt;p&gt;Column Profiling (replaces .describe())&lt;br&gt;
python&lt;br&gt;
dataset.profile()&lt;br&gt;
Unlike .describe() which only covers numeric columns, OMR profiles every column — numeric, categorical, and boolean — in a clean terminal table.&lt;/p&gt;

&lt;p&gt;The Fluent API&lt;br&gt;
Chain everything together:&lt;/p&gt;

&lt;p&gt;python&lt;br&gt;
clean_df = (Dataset(df)&lt;br&gt;
    .health()&lt;br&gt;
    .clean()&lt;br&gt;
    .analyze()&lt;br&gt;
    .export())  # Exports HTML, Markdown, or JSON report&lt;br&gt;
Why I Built This&lt;br&gt;
The goal is for OMR to become the first thing you run after pd.read_csv() — not a replacement for Pandas, but the quality layer on top of it.&lt;/p&gt;

&lt;p&gt;Links&lt;br&gt;
PyPI: pip install omni-data-refinement&lt;br&gt;
GitHub: &lt;a href="https://github.com/Omar-Alshafai2/omni-data-refinement" rel="noopener noreferrer"&gt;https://github.com/Omar-Alshafai2/omni-data-refinement&lt;/a&gt;&lt;br&gt;
Docs: &lt;a href="https://Omar-Alshafai2.github.io/omni-data-refinement/" rel="noopener noreferrer"&gt;https://Omar-Alshafai2.github.io/omni-data-refinement/&lt;/a&gt;&lt;br&gt;
Examples: &lt;a href="https://Omar-Alshafai2.github.io/omni-data-refinement/examples/" rel="noopener noreferrer"&gt;https://Omar-Alshafai2.github.io/omni-data-refinement/examples/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What data quality problems do you run into most? I would love to know what to build next.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>datascience</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
