A wrapper around gitpython to produce pandas dataframes for analysis
Python BSD-3-Clause
191 Stars
25 Forks
4 Issues
Languages
Top Contributors
Recent Releases
Project Info
- Created
- October 27, 2015
- Last Updated
- November 17, 2026
- License
- BSD-3-Clause
- Default Branch
- master
About This Project
Git Pandas wraps GitPython to produce pandas DataFrames for Git repository analysis. It enables data-driven analysis of Git repositories with features for commit history, blame information, and project-level insights.
Pandas vs Git?
A lot of people land on this page searching for “pandas vs git,” so it’s worth clearing up: they aren’t alternatives to each other, and git-pandas is about combining them.
- Git is a version control system. It tracks changes to files over time, mostly source code, and records who changed what and when.
- pandas is a Python library for working with tabular data in memory. It gives you the DataFrame, plus tools for filtering, grouping, joining, and summarizing data.
You’d never pick one instead of the other. Where they overlap is that a Git repository is itself a pile of data: every commit has an author, a timestamp, a message, and a list of files with lines added and removed. git-pandas reads that history and hands it to you as pandas DataFrames, so questions like “which files change most often,” “who knows this part of the codebase,” or “when does this team actually commit” become ordinary DataFrame operations.
If what you’re actually after is version control for your data (tracking changes to CSVs, parquet files, or model artifacts the way Git tracks code), that’s a different problem. Plain Git works for small text data files, and tools like DVC or Git LFS exist for larger ones. git-pandas goes the other direction: it uses pandas to analyze Git, rather than using Git to version pandas data.
Features
- Commit Analysis: Convert commit history into pandas DataFrames
- Blame Data: Analyze file ownership and contribution patterns
- Project Aggregation: Analyze multiple repositories together
- Caching: Redis-backed caching for faster repeated analysis
- Visualizations: Built-in punchcard and contribution charts
Installation
Quick Start
from gitpandas import Repository
repo = Repository('/path/to/repo')
# Get commit history as DataFrame
commits = repo.commit_history()
# Analyze file blame
blame = repo.blame()
# Generate punchcard data
punchcard = repo.punchcard()