<?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: Muhammad Muntazir</title>
    <description>The latest articles on DEV Community by Muhammad Muntazir (@muhammad_muntazir_92189c7).</description>
    <link>https://dev.to/muhammad_muntazir_92189c7</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%2F4028120%2Fad379a71-c7a9-4bc4-9528-2d76ae7aea0f.png</url>
      <title>DEV Community: Muhammad Muntazir</title>
      <link>https://dev.to/muhammad_muntazir_92189c7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammad_muntazir_92189c7"/>
    <language>en</language>
    <item>
      <title>Garbage In, Garbage Out: A Beginner’s Guide to Data Cleaning</title>
      <dc:creator>Muhammad Muntazir</dc:creator>
      <pubDate>Tue, 14 Jul 2026 06:32:59 +0000</pubDate>
      <link>https://dev.to/muhammad_muntazir_92189c7/garbage-in-garbage-out-a-beginners-guide-to-data-cleaning-4be9</link>
      <guid>https://dev.to/muhammad_muntazir_92189c7/garbage-in-garbage-out-a-beginners-guide-to-data-cleaning-4be9</guid>
      <description>&lt;p&gt;When you first dive into machine learning, it is easy to get swept up in the excitement of building complex models and neural networks. However, there is a golden rule in data science that every beginner must learn early: &lt;strong&gt;Garbage In, Garbage Out (GIGO)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;No matter how sophisticated or powerful your AI algorithm is, if you feed it messy, inaccurate, or incomplete data, it will produce useless predictions. In fact, professional data scientists spend roughly &lt;strong&gt;80% of their time cleaning and preparing data&lt;/strong&gt;, and only 20% building models.&lt;/p&gt;

&lt;p&gt;This post is your quick, beginner-friendly roadmap to understanding what data cleaning is, why it matters, and how to perform the most common cleaning steps.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why is Raw Data "Garbage"?
&lt;/h2&gt;

&lt;p&gt;Real-world data is collected from sensors, human inputs, web scraping, and diverse databases. Because of this, raw datasets are almost always messy. Common issues include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Missing values&lt;/strong&gt; (e.g., a user skipped entering their age on a form).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Duplicates&lt;/strong&gt; (e.g., a system error recorded the same transaction twice).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inconsistent formatting&lt;/strong&gt; (e.g., writing a date as "07/14/2026", "14 July 2026", or "2026-07-14").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outliers&lt;/strong&gt; (e.g., a data entry typo listing a house price as $10 billion instead of $1 million).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you feed these anomalies into an AI, the model will assume they are valid patterns, completely throwing off its calculations.&lt;/p&gt;




&lt;h2&gt;
  
  
  The 4 Core Steps of Data Cleaning
&lt;/h2&gt;

&lt;p&gt;To turn "garbage" data into gold, data scientists follow a structured preprocessing pipeline. Here are the four foundational steps:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Handling Missing Data
&lt;/h3&gt;

&lt;p&gt;When a dataset has missing values (often represented as &lt;code&gt;NaN&lt;/code&gt; or &lt;code&gt;Null&lt;/code&gt; in programming), you have two main choices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Deletion:&lt;/strong&gt; Remove the entire row or column containing the missing value.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Rule of thumb:&lt;/em&gt; Only do this if you have a massive dataset and the missing values make up less than 5% of your data.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Imputation:&lt;/strong&gt; Fill in the missing values with a logical estimate. For numerical data (like salary), you might fill the blank space with the &lt;strong&gt;mean (average)&lt;/strong&gt; or &lt;strong&gt;median&lt;/strong&gt; value of that column. For categorical data (like country), you might fill it with the &lt;strong&gt;mode&lt;/strong&gt; (the most common value).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Removing Duplicates
&lt;/h3&gt;

&lt;p&gt;Duplicate rows are a silent killer in machine learning. If the exact same data point appears multiple times, your model will over-prioritize that specific point, leading to biased results.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Fix:&lt;/strong&gt; Use simple coding functions (like &lt;code&gt;.drop_duplicates()&lt;/code&gt; in the Python Pandas library) to scan your dataset and keep only the first unique instance of each row.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Dealing with Outliers
&lt;/h3&gt;

&lt;p&gt;An outlier is a data point that is vastly different from the rest of the dataset. While some outliers are real, valuable exceptions, many are simply typos or sensor glitches.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How to spot them:&lt;/strong&gt; Data scientists use simple statistical rules (like the Interquartile Range, or IQR) to identify numbers that sit too far outside the normal distribution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix:&lt;/strong&gt; If the outlier is a clear error (e.g., &lt;code&gt;Age = 350&lt;/code&gt;), delete or correct it. If it is a real but extreme case, you may want to keep it or cap it at a maximum threshold to prevent it from skewing the model's training.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Standardizing and Formatting
&lt;/h3&gt;

&lt;p&gt;AI models are excellent at math, but terrible at interpreting different text formats. Before training, you must standardize your data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Text Normalization:&lt;/strong&gt; Convert all text data to lowercase and remove accidental spaces (e.g., turning &lt;code&gt;" New York "&lt;/code&gt; and &lt;code&gt;"new york"&lt;/code&gt; both into &lt;code&gt;"new york"&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type Conversion:&lt;/strong&gt; Ensure numbers are saved as numerical data types (integers/floats) rather than text strings, so your model can perform mathematical equations on them.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Summary: A Clean Start
&lt;/h2&gt;

&lt;p&gt;Data cleaning isn’t a chore that gets in the way of machine learning; &lt;strong&gt;it is the most critical part of machine learning&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By taking the time to handle missing values, remove duplicates, filter out errors, and standardize your formats, you build a solid foundation. When you feed clean data into even a simple machine learning model, you will get incredibly accurate, highly reliable results. &lt;/p&gt;

&lt;p&gt;Remember: &lt;strong&gt;Clean data beats a fancy algorithm every single time.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>datascience</category>
      <category>machinelearning</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
