Knowledge Graph — Coursera NotesAcademic disciplinesInformation Technology / Computer ScienceArtificial IntelligenceMachine Learning & DataData preprocessing

Data cleaning

concept · part of Data preprocessing

The process of handling missing values, outliers, and inconsistencies in a dataset.

Data cleaning for text includes converting to lowercase, stripping whitespace, removing URLs (e.g., http\S+), and removing special characters (e.g., [^\w\s]). The clean_text function in the example applies these steps using regex and string methods.

def clean_text(text):
    text = text.lower().strip()
    text = re.sub(r"http\S+", "", text)
    text = re.sub(r"[^\w\s]", "", text)
    return text

Inside Data cleaning (5)

Connections

This is the text view of an interactive 3D knowledge graph — open this page with JavaScript enabled to explore it visually.

🧠 Knowledge Graph

Select a node

The owner's editing tools — shown here so you can see how the graph is grown, but read-only.

Click a bubble to drill in · click again to collapse · drag to move around