Back to skills
SKILL.md
Data Cleaning Patterns
ASecurityClean messy datasets nulls outliers duplicates normalization
- 2 stars
- 0 votes
- 0 copies
- 3 views
- Added September 10, 2026
Security analysis
100/100npx -y skills add LoopyLuci/Skills --skill data-cleaning-patterns --agent claude-codeAre you the author of Data Cleaning Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/loopyluci-data-cleaning-patterns)---
name: data-cleaning-patterns
description: "Clean messy datasets nulls outliers duplicates normalization"
---
# Data Cleaning Patterns
## With pandas
```python
import pandas as pd
df = pd.read_csv("data.csv")
# Drop duplicates
df = df.drop_duplicates()
# Handle nulls
df = df.fillna(0) # Fill with default
df = df.dropna(subset=["id"]) # Drop rows missing key
# Outliers (IQR method)
Q1, Q3 = df["price"].quantile([0.25, 0.75])
iqr = Q3 - Q1
mask = (df["price"] >= Q1 - 1.5*iqr) & (df["price"] <= Q3 + 1.5*iqr)
df = df[mask]
# Type coercion
df["date"] = pd.to_datetime(df["date"])
df["amount"] = pd.to_numeric(df["amount"], errors="coerce")
```
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.