{
  "id": "python/pandas-parsererror-tokenizing",
  "signature": "pandas.errors.ParserError: Error tokenizing data. C error: Expected 5 fields in line 42, saw 7",
  "signature_zh": "pandas.errors.ParserError: 数据分词错误。C 错误：第 42 行期望 5 个字段，实际出现 7 个",
  "regex": "pandas\\.errors\\.ParserError:\\ Error\\ tokenizing\\ data\\.\\ C\\ error:\\ Expected\\ 5\\ fields\\ in\\ line\\ 42,\\ saw\\ 7",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "A CSV row contains more delimiters than the header row, usually due to unescaped commas inside a quoted field or an extra column introduced mid-file.",
  "root_cause_type": "generic",
  "root_cause_zh": "CSV 某一行的分隔符数量多于表头，通常由于带引号字段内未转义的逗号，或文件中途引入了额外列。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Removed in pandas 2.0; raises TypeError",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Slower but still raises ParserError on bad rows",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "pd.read_csv(path, on_bad_lines='skip')  # or 'warn'",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "pd.read_csv(path, sep=';', quoting=csv.QUOTE_ALL) after inspecting line 42",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-03",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}