CSV Missing Value Cleaner
Remove incomplete rows or fill blank cells
CSV Missing Value Cleaner — what it does
Deal with blank cells in one pass: either drop every row that has a gap, or fill all blanks with a replacement value you specify. Both approaches are legitimate, and choosing between them is a data decision — deletion keeps the remaining records honest, filling keeps the row count but introduces a value nobody actually recorded.
Worked example
A contact list with three gaps run with Fill blank cells and N/A as the fill value; a second run with Remove rows with blanks is described in the note.
Input — contacts-gaps.csv
name,email,department,phone Ann Lee,ann.lee@example.com,Sales,555-0101 Ben Ortiz,,Engineering,555-0102 Chloe Park,chloe.park@example.com,,555-0103 Dev Patel,dev.patel@example.com,Support, Emma Rossi,emma.rossi@example.com,Engineering,555-0105
Output — cleaned.csv (Fill blank cells, N/A)
name,email,department,phone Ann Lee,ann.lee@example.com,Sales,555-0101 Ben Ortiz,N/A,Engineering,555-0102 Chloe Park,chloe.park@example.com,N/A,555-0103 Dev Patel,dev.patel@example.com,Support,N/A Emma Rossi,emma.rossi@example.com,Engineering,555-0105
The status reads 5 rows ready. With Remove rows with blanks the same file keeps only Ann Lee and Emma Rossi (2 rows ready). Either way the download is called cleaned.csv.
When this tool helps
- Preparing a dataset for a chart or import that rejects null values outright.
- Filling blank quantity or status cells with a defensible default such as 0 or Unknown.
- Removing partially completed survey or form responses before analysis.
How to use it
- Choose the CSV file.
- Pick an action: remove rows with blanks or fill blank cells.
- If filling, enter the value to insert.
- Process and download the cleaned CSV.
Accuracy, limits, and good practice
- Filling numeric gaps with 0 changes averages and totals. Unknown or an empty string is safer when the value is genuinely missing rather than zero.
- Removing rows can bias a dataset badly if the gaps are not random — missing income fields, for example, are rarely missing at random.
- Cells holding only spaces look blank but are not. Check with the whitespace visualizer if a clean-looking file still reports gaps.
Frequently asked questions
Does it remove rows if only one cell is blank?
Yes, the remove action drops any row with at least one empty cell. Extract the columns you care about first if that is too aggressive.
Can I fill different columns with different values?
Run the tool once per column set, or extract the relevant columns, fill them and rejoin on a key column.
How many rows were affected?
Compare the input and output row counts, or run the CSV file difference tool to list exactly which rows disappeared.
Is a cell that contains only spaces treated as blank?
Yes. Each cell is trimmed before the check, so a cell holding only spaces is filled, or causes its row to be removed, exactly like an empty one. Cells with real content are written back untrimmed.
What happens to a row that has fewer cells than the header?
In fill mode the missing cells are added and filled, so every output row has the full width. In remove mode only the cells that exist are checked, so a short row without an empty cell is kept and stays short.
Related tools on this site
- CSV Column Merger — Combine selected CSV columns into a new field
- CSV Group & Aggregate — Group rows and calculate sum, average, count, min, or max
- CSV to JSON — Convert CSV rows into JSON objects
Further reading: Cleaning a CSV export before you import it anywhere · CSV, JSON, YAML, XML and Markdown Tables: When Each Fits and How to Convert
Everything above runs inside this page. CSV Missing Value Cleaner needs no account, no upload, and no server round trip — close the tab and nothing is left behind.
CSV 缺失值清理能做什麼
一次處理空白儲存格:可以刪掉所有含空格的資料列,也可以用你指定的值填滿所有空白。兩種做法都合理,選哪一種是資料判斷——刪除能保住剩餘紀錄的真實性,填補則保住列數,但也塞進了沒有人真正記錄過的值。
實際範例
有三個缺口的聯絡人名單,以「填補空白儲存格」執行、填補值為 N/A;註解裡另外說明以「去掉有空白的列」再跑一次的情形。
來源:contacts-gaps.csv
name,email,department,phone Ann Lee,ann.lee@example.com,Sales,555-0101 Ben Ortiz,,Engineering,555-0102 Chloe Park,chloe.park@example.com,,555-0103 Dev Patel,dev.patel@example.com,Support, Emma Rossi,emma.rossi@example.com,Engineering,555-0105
得到:cleaned.csv(填補空白儲存格,N/A)
name,email,department,phone Ann Lee,ann.lee@example.com,Sales,555-0101 Ben Ortiz,N/A,Engineering,555-0102 Chloe Park,chloe.park@example.com,N/A,555-0103 Dev Patel,dev.patel@example.com,Support,N/A Emma Rossi,emma.rossi@example.com,Engineering,555-0105
狀態列顯示 5 rows ready。同一個檔案改成去掉有空白的列時,只剩 Ann Lee 與 Emma Rossi 兩列(2 rows ready)。兩種模式的下載檔都叫 cleaned.csv。
什麼時候用得上
- 為完全不接受空值的圖表或匯入程式準備資料。
- 把空白的數量或狀態欄,填成 0 或「未知」等說得過去的預設值。
- 分析前先移除只填了一半的問卷或表單回覆。
使用步驟
- 選擇 CSV 檔案。
- 選擇處理方式:刪除含空白的列,或填補空白儲存格。
- 若選填補,輸入要填入的值。
- 執行處理並下載清理後的 CSV。
精確度、限制與實務建議
- 把數值空白填成 0 會改變平均與總和;當值是「真的沒有」而不是「等於零」時,填「未知」或留空更安全。
- 若缺失並非隨機發生,刪除列會嚴重扭曲資料——例如收入欄的缺漏通常就不是隨機的。
- 只含空格的儲存格看起來像空白但其實不是;檔案看似乾淨卻仍回報空格時,可用空白字元檢視工具確認。
常見問題
只有一格空白也會刪整列嗎?
會,刪除模式只要該列有任一空白儲存格就會移除。若太嚴格,請先提取真正在意的欄位再處理。
不同欄位可以填不同的值嗎?
請針對各組欄位分次執行,或先提取相關欄位填補後,再以鍵值欄位合併回去。
怎麼知道影響了多少列?
比對輸入與輸出的列數,或用 CSV 檔案差異比較工具列出實際消失的資料列。
只含空格的儲存格算空白嗎?
算。每個儲存格在判斷前都會先去掉前後空白,所以只有空格的儲存格會被填補,或讓整列被去掉,和真正的空儲存格一樣。有實際內容的儲存格則原樣寫回,不會被修剪。
某一列的儲存格比欄名少會怎樣?
填補模式會把缺的儲存格補上並填值,每一列都會有完整寬度。去掉模式只檢視實際存在的儲存格,所以一列雖短但沒有空儲存格時會被留下,而且維持原本的短長度。
本站相關工具
- CSV 欄位合併 — 將選定 CSV 欄位合併成新欄位
- CSV 分組彙總 — 依欄位分組並計算加總、平均、計數、最小或最大值
- CSV 轉 JSON — 將 CSV 資料列轉換成 JSON 物件
延伸閱讀: 匯入之前先把 CSV 匯出檔清乾淨 · CSV、JSON、YAML、XML 與 Markdown 表格:各自適用的場合與轉換方法
以上步驟全部在這個頁面內完成,CSV 缺失值清理 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。