Editing
Comparison of common data file formats in Mandarin
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== 常見格式快速比較表 == <table class="wikitable"> <tr> <th>格式</th> <th>階層性</th> <th>人類易讀</th> <th>筆數/容量限制</th> <th>常見問題</th> </tr> <tr> <td>'''CSV'''</td> <td>無(表格式)</td> <td>高</td> <td>格式本身無上限,取決於開啟軟體(Excel 約 104 萬列)</td> <td>中文亂碼、換行符號欄位值易錯位、數字型別被強制轉換(如電話號碼開頭 0 消失)</td> </tr> <tr> <td>'''TSV'''</td> <td>無(表格式)</td> <td>高</td> <td>同 CSV,格式本身無上限</td> <td>與 CSV 相同,但可避免欄位值含逗號時的分隔誤判</td> </tr> <tr> <td>'''Excel'''</td> <td>無(表格式)</td> <td>高</td> <td>理論上限 1,048,576 列 × 16,384 欄;單一儲存格文字上限 32,767 字;超過 10 萬筆操作易頓</td> <td>長數字被轉成科學記號、特定字串誤判為日期</td> </tr> <tr> <td>'''JSON'''</td> <td>有</td> <td>中</td> <td>格式本身無筆數上限,瓶頸為讀取時須整檔載入記憶體</td> <td>大檔案(如 250MB+)易記憶體不足;建議改用 JSONL 串流讀取</td> </tr> <tr> <td>'''SQLite'''</td> <td>無(關聯式)</td> <td>低(需工具開啟)</td> <td>理論上限 2⁶⁴ 筆,實際受資料庫檔案 281 TB 上限限制(約 2×10¹³ 筆)</td> <td>需透過資料庫工具讀寫,不利直接檢視</td> </tr> <tr> <td>'''Parquet'''</td> <td>無(欄式)</td> <td>低(需工具開啟)</td> <td>格式本身無理論筆數上限(以 Row Group 為單位,預設每組 100 萬筆,可有任意組數)</td> <td>實務瓶頸為硬碟空間,非格式限制;已有成功案例寫入 5~10 億筆</td> </tr> <tr> <td>'''SQL 檔'''</td> <td>無</td> <td>中</td> <td>純文字格式本身無上限,限制來自匯入工具</td> <td>檔案過大時文字編輯器易當機;不同資料庫引擎語法相容性問題</td> </tr> </table> '''建議:''' # 需要巢狀/自由格式欄位 → JSON(大量資料改 JSONL) # 資料量超過百萬筆、只需搬移資料 → Parquet 或 CSV # 需要還原完整資料庫結構(含關聯、索引) → SQL 或 SQLite # 一般使用試算表軟體開啟操作 → CSV / Excel,如果要使用 CSV / Excel 顯示階層結構,在欄位名稱可透過分隔符號呈現,例如 {{kbd | key=<nowiki>aaa / bbb</nowiki>}}
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information