{
  "id": "python/pandas-dtype-warning-mixed",
  "signature": "pandas.errors.DtypeWarning: Columns (2,5) have mixed types. Specify dtype option on import or set low_memory=False.",
  "signature_zh": "pandas.errors.DtypeWarning：列 (2,5) 具有混合类型。请在导入时指定 dtype 选项或设置 low_memory=False。",
  "regex": "pandas\\.errors\\.DtypeWarning:\\ Columns\\ \\(2,5\\)\\ have\\ mixed\\ types\\.\\ Specify\\ dtype\\ option\\ on\\ import\\ or\\ set\\ low_memory=False\\.",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "CSV column contains mixed data types; pandas infers chunk-wise dtype.",
  "root_cause_type": "generic",
  "root_cause_zh": "CSV 列包含混合数据类型；pandas 分块推断 dtype 时产生不一致。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Silences warning but keeps object dtype; downstream ops still break",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Values may be parsed as strings, breaking numeric ops",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "pd.read_csv(path, dtype={'col2': str, 'col5': str})",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "pd.read_csv(path, converters={'col2': lambda x: x.strip()})",
      "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-07-16",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}