{
 "kind": "tool",
 "slug": "pandas",
 "path": "tools/pandas/",
 "name": "pandas",
 "maker": null,
 "density": "full",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "ML and data science",
   "tools/ml-data-science/"
  ]
 ],
 "lead": "Tables of data in Python, like a spreadsheet in code.",
 "chips": [
  {
   "label": "ML and data science",
   "path": "tools/ml-data-science/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install pandas"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/pandas-dev/pandas"
  },
  {
   "label": "Website",
   "href": "https://pandas.pydata.org"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "BSD-3-Clause",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met",
   "note": "Free for paid and closed products; keep the BSD notice when you ship pandas.",
   "src": "https://github.com/pandas-dev/pandas/blob/main/LICENSE"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 23, 2026",
   "note": "Latest GitHub release Nov 4, 2026. ",
   "src": "https://github.com/pandas-dev/pandas"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "268 projects",
   "status": "info",
   "sub": "#2 of 293 in its category",
   "note": "Dependency in 268 public GitHub projects set up for AI coding agents that we scanned (4.3%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Community skills",
   "status": "info",
   "sub": "2 skills by others",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily; card checked Nov 11, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What pandas does",
   "parts": [
    {
     "t": "prose",
     "text": "pandas is a free Python library for working with tables of data in code. Your app or script reads a CSV or Excel file, cleans gaps, sums and groups rows, and saves a report or a chart. It works on data that fits in the computer's memory; much bigger data needs other tools."
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Monthly sales report from a CSV",
       "text": "Turn an export of orders into a table of revenue per month and product, ready for a dashboard or an email.",
       "idea": false
      },
      {
       "title": "Clean messy exports before import",
       "text": "Find and drop rows with empty fields, fix types and remove duplicates before data goes into your database.",
       "idea": false
      },
      {
       "title": "Totals per customer group",
       "text": "Sum revenue per city, plan or customer and sort the biggest first.",
       "idea": false
      },
      {
       "title": "Chart for a weekly update",
       "text": "Draw a bar or line chart straight from the table and save it as an image for a report or a site.",
       "idea": false
      },
      {
       "title": "Join two data sources",
       "text": "Combine a payments export with a customer list by customer ID to see who paid what.",
       "idea": false
      },
      {
       "title": "Answer data questions from an AI agent",
       "text": "An AI assistant loads an uploaded spreadsheet into pandas and answers questions like \"which month sold most mugs\".",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "pandas popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "88",
       "of": "/ 100",
       "l": "Gid Score, #18 overall"
      },
      {
       "n": "164M",
       "l": "downloads a week, pypi"
      },
      {
       "n": "50.6K",
       "l": "GitHub stars"
      },
      {
       "n": "268",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How pandas is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "pandas is a dependency in 268 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (16.5% of the 1,623 Python ones), #2 of 293 in ml and data science.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 2,824; those are left out of every share on this page.",
      "Projects that use it most often also use NumPy (70.5%), python-dotenv (50.0%), Requests (46.6%).",
      "It is more common in projects set up for Roo Code (8.1%) than for OpenAI Codex (2.8%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "136 projects, 4.5%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "133 projects, 4.1%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "97 projects, 4.0%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "19 projects, 6.8%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      },
      {
       "l": "16 projects, 3.4%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "16 projects, 4.8%",
       "v": "OpenClaw",
       "path": "agents/openclaw/"
      },
      {
       "l": "13 projects, 2.8%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "9 projects, 8.1%",
       "v": "Roo Code",
       "path": "agents/roo-code/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 70.5% of its projects",
       "v": "NumPy",
       "path": "tools/numpy/"
      },
      {
       "l": "In 50.0% of its projects",
       "v": "python-dotenv",
       "path": "tools/python-dotenv/"
      },
      {
       "l": "In 46.6% of its projects",
       "v": "Requests",
       "path": "tools/requests-py/"
      },
      {
       "l": "In 41.0% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 38.4% of its projects",
       "v": "scikit-learn",
       "path": "tools/scikit-learn/"
      },
      {
       "l": "In 38.1% of its projects",
       "v": "Matplotlib",
       "path": "tools/matplotlib/"
      },
      {
       "l": "In 36.2% of its projects",
       "v": "Uvicorn",
       "path": "tools/uvicorn/"
      },
      {
       "l": "In 35.4% of its projects",
       "v": "PyYAML",
       "path": "tools/pyyaml/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "pandas in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Labels line data up for you",
       "v": "Objects can be aligned to an explicit set of labels. You can also ignore the labels and let <code>Series</code> and <code>DataFrame</code> align the data automatically during computations."
      },
      {
       "l": "Split-apply-combine built in",
       "v": "Group by handles both aggregating and transforming data. Merging, joining, reshaping and pivot tables sit alongside it."
      },
      {
       "l": "Time series tools included",
       "v": "The README lists date range generation, frequency conversion, moving window statistics, and date shifting and lagging."
      },
      {
       "l": "Install only the formats you need",
       "v": "Extras such as <code>pandas[excel]</code>, <code>pandas[parquet]</code> or <code>pandas[aws]</code> pull in the readers and writers for one job. You can pin them in <code>requirements.txt</code> or <code>pyproject.toml</code>."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Missing extras surface as ImportError on use",
       "v": "pandas raises <code>ImportError</code> when you call a method whose optional dependency is not installed. For example, <code>read_hdf()</code> needs pytables and <code>to_markdown()</code> needs tabulate."
      },
      {
       "l": "read_html needs more than BeautifulSoup",
       "v": "BeautifulSoup4 alone is not enough for <code>read_html()</code>. The docs say you must also install lxml, html5lib, or both."
      },
      {
       "l": "read_orc() and pip-installed pyarrow",
       "v": "The docs say <code>read_orc()</code> \"may fail if pyarrow was installed from pypi\" and recommend installing pyarrow with conda. They also say <code>read_orc()</code> is not compatible with Windows."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Install pandas, then add the Excel extra"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Sh",
       "code": "pip install pandas\npip install \"pandas[excel]\""
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about pandas",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "Open Collective: https://opencollective.com/pandas"
       ]
      },
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        "pandas-pro: Performs pandas DataFrame operations for data analysis, manipulation, and transformation. Use when working with pandas DataFrames, data clea",
        "pandas-pro: Performs pandas DataFrame operations for data analysis, manipulation, and transformation. Use when working with pandas DataFrames, data clea"
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "numpy: Required array dependency",
        "python-dotenv: Loads .env config",
        "requests: HTTP client",
        "pydantic: Data validation",
        "scikit-learn: Machine learning",
        "matplotlib: Plotting (plot extra)"
       ]
      },
      {
       "title": "More in ML and data science",
       "path": "tools/ml-data-science/",
       "items": [
        {
         "text": "NumPy",
         "path": "tools/numpy/"
        },
        {
         "text": "scikit-learn",
         "path": "tools/scikit-learn/"
        },
        {
         "text": "SciPy",
         "path": "tools/scipy/"
        },
        {
         "text": "PyTorch",
         "path": "tools/torch/"
        },
        {
         "text": "Sentence Transformers",
         "path": "tools/sentence-transformers/"
        },
        {
         "text": "Hugging Face Transformers",
         "path": "tools/transformers/"
        },
        {
         "text": "Chroma (Python)",
         "path": "tools/chromadb-pypi/"
        },
        {
         "text": "NetworkX",
         "path": "tools/networkx/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "pandas",
       "me": true,
       "facts": [
        "BSD-3-Clause",
        "Gid 88",
        "164M/wk"
       ]
      },
      {
       "name": "Polars",
       "why": "Pick Polars for larger files or when speed matters most; it is a separate DataFrame library with its own API.",
       "path": "tools/polars/",
       "facts": []
      },
      {
       "name": "DuckDB",
       "why": "Pick DuckDB when you would rather ask your CSV or Parquet files questions in SQL.",
       "path": "tools/duckdb/",
       "facts": []
      },
      {
       "name": "openpyxl",
       "why": "Pick openpyxl when you need to edit an Excel file itself (cells, styles, formulas) rather than analyse its data.",
       "path": "tools/openpyxl/",
       "facts": []
      }
     ],
     "more": "Compare pandas with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Use pandas 3.1.1 (Python 3.11+) to load this CSV, drop incomplete rows, total revenue per month and product with pivot_table, and save the table and a matplotlib bar chart; use .loc for updates, never chained assignment."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Install pandas into your project's Python environment (Python 3.11 or newer).",
       "code": "pip install pandas",
       "src": "https://pandas.pydata.org/docs/getting_started/install.html"
      },
      {
       "text": "For Excel files, install the optional Excel extras too.",
       "code": "pip install \"pandas[excel]\"",
       "src": "https://pandas.pydata.org/docs/getting_started/install.html"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## pandas\n- Install and run pandas inside a virtual environment (for example `venv`, or a conda env from conda-forge).\n- Declare the extras a feature needs in `requirements.txt` or `pyproject.toml`, e.g. `pandas[excel]`, `pandas[parquet]`, `pandas[aws]`.\n- Expect an `ImportError` at call time when a method's optional dependency is missing; add the matching extra rather than catching the error.\n- For large data sets, add `pandas[performance]` (numexpr, bottleneck, numba).\n- For `read_html()`, install BeautifulSoup4 together with lxml or html5lib, never BeautifulSoup4 alone.\n- Read xls/xlsb files with python-calamine, not the deprecated xlrd or pyxlsb.\n- For `read_orc()`, install pyarrow with conda; it may fail with pyarrow from PyPI and is not compatible with Windows.\n"
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "df[\"flag\"][df[\"qty\"] > 4] = \"big\"",
       "fix": "df.loc[df[\"qty\"] > 4, \"flag\"] = \"big\"",
       "why": "In pandas 3 chained assignment never changes df; in our run it left the column unchanged and raised a ChainedAssignmentError warning."
      },
      {
       "dont": "if df[\"name\"].dtype == object",
       "fix": "Use pd.api.types.is_string_dtype(df[\"name\"]), or compare with \"str\"",
       "why": "Text columns now load as the str type; in our run df[\"flag\"].dtype == object was False."
      },
      {
       "dont": "df = df.append(row_df)",
       "fix": "df = pd.concat([df, row_df], ignore_index=True)",
       "why": "DataFrame.append was removed in pandas 2.0; in our run it raised AttributeError."
      },
      {
       "dont": "pip install pandas, then pd.read_excel(\"file.xlsx\")",
       "fix": "pip install \"pandas[excel]\" (or add openpyxl) before reading .xlsx files",
       "why": "Excel readers are optional packages and are not installed with pandas itself."
      },
      {
       "dont": "pip install pandas==3.1.1 on Python 3.9 or 3.10",
       "fix": "Make a virtual environment on Python 3.11 or newer first",
       "why": "pandas 3 supports only Python 3.11 and higher."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Can it read Excel files?",
       "a": "Yes, after you install the Excel extras (pip install \"pandas[excel]\"), which bring openpyxl and related readers.",
       "evidence": {
        "url": "https://pandas.pydata.org/docs/getting_started/install.html",
        "quote": "For example, to install pandas with the optional dependencies to read Excel files."
       }
      },
      {
       "q": "Why does my old code df[\"col\"][mask] = value no longer change anything?",
       "a": "In pandas 3 every selection is a copy, so this chained assignment does nothing. Write df.loc[mask, \"col\"] = value.",
       "evidence": {
        "url": "https://pandas.pydata.org/docs/whatsnew/v3.0.0.html",
        "quote": "Because this now consistently never works, the SettingWithCopyWarning is removed"
       }
      },
      {
       "q": "Where did DataFrame.append go?",
       "a": "It was removed in pandas 2.0; use pd.concat instead.",
       "evidence": {
        "url": "https://pandas.pydata.org/docs/whatsnew/v2.0.0.html",
        "quote": "Removed deprecated Series.append() , DataFrame.append() , use concat() instead"
       }
      },
      {
       "q": "Can pandas handle a 50 GB file on a laptop?",
       "a": "Not directly. It works in memory; its docs suggest loading fewer columns, smaller types or other libraries for data larger than memory.",
       "evidence": {
        "url": "https://pandas.pydata.org/docs/user_guide/scale.html",
        "quote": "This document provides a few recommendations for scaling your analysis to larger datasets."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi pandas"
  ],
  [
   "Category",
   "ML and data science"
  ],
  [
   "License",
   "BSD-3-Clause"
  ],
  [
   "Latest version",
   "v3.1.1, November 4, 2026"
  ],
  [
   "On GitHub since",
   "August 2010"
  ],
  [
   "Gid Score",
   "87.7"
  ],
  [
   "Rank in category",
   "#2 of 293"
  ],
  [
   "GitHub",
   "pandas-dev/pandas"
  ],
  [
   "Last change",
   "Nov 23, 2026"
  ]
 ],
 "good": [
  "pandas 3 needs Python 3.11 or newer.",
  "Version 3 changed two defaults: text columns get their own str type, and every selection behaves as a copy. Old code and old tutorials can break.",
  "It keeps the whole table in memory, so files close to your memory size get slow or fail."
 ],
 "checked_line": "Read by AgentGid from 8 official pages, card checked Nov 11, 2026; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/pandas-dev.png"
}