Sketch

Sketch

★ 3.8 🔖 1200 saves 💰 Free Code AssistantGitHub

Sketch is an open-source AI assistant for pandas DataFrames that understands the content of your data, not just its column names. Built by Approximate Labs and starred around 2,300 times on GitHub, it lets data scientists ask questions about a dataset in plain English and get answers or ready-to-run code back. It is unrelated to the Sketch design tool.

Overview

Sketch computes a statistical sketch of your DataFrame — distributions, example values, and inferred semantics — and feeds that context to a language model. That grounding is what makes its answers data-aware: it can summarize what a messy column actually contains, suggest cleaning steps, and write pandas code tailored to the real data rather than guessing at its shape.

Key Features

  • ask() to answer natural-language questions about a DataFrame
  • howto() to generate pandas code for a requested transformation
  • apply() to run LLM-powered labeling or extraction across rows
  • Automatic data profiling so the model sees distributions and sample values
  • Works as a pandas accessor: load it and call methods on any DataFrame
  • Pluggable LLM backends through its lambdaprompt layer

The technique behind Sketch comes from Approximate Labs’ research on “sketching” data for language models: instead of dumping raw rows into a prompt, it summarizes each column with type guesses, value distributions, and representative samples. That is why Sketch can answer questions like “which column looks like it contains dates?” or flag likely data-quality problems. It was one of the earliest widely adopted examples of an LLM assistant designed specifically around pandas workflows.

Sketch works best as an accelerator for exploratory analysis: instead of replacing your judgment, it gives you a fast first pass — a summary, a plausible transformation, a chart idea — that you can then verify and refine with ordinary pandas code.

💳 Pricing

Sketch is free and open source under the MIT license. The only cost is the LLM API usage for the model you connect it to.

Who Is It For

Data scientists and analysts who explore data in pandas and want an AI assistant that actually looks at their data before answering.

🚀 Visit Sketch Official Site

🚩 Report an issue