Skip to main content
Sourcetable’s AI runs Python code under the hood to perform complex data transformations, statistical analysis, and visualizations. You don’t need to write Python yourself — the AI generates and executes it based on your natural language instructions.

How it works

When you ask the AI to perform an operation that benefits from code execution, it:
  1. Generates Python code tailored to your request
  2. Executes it against your spreadsheet data
  3. Returns the results (tables, charts, statistics, or transformed data)
  4. Optionally shows you the code it ran

Available libraries

Example operations

Data normalization

Ask: “Normalize the revenue column using min-max scaling”

Statistical testing

Ask: “Run a t-test comparing revenue between Group A and Group B”

Time series forecasting

Ask: “Forecast next quarter’s revenue using ARIMA”

Correlation heatmap

Ask: “Show me a correlation heatmap of all numeric columns”

Feature engineering

Ask: “Create a customer lifetime value feature from order history”

When Python is used vs. spreadsheet formulas

Viewing and modifying the code

To see the code the AI executed:
  • Ask “Show me the code you used” or “What Python did you run?”
  • The AI displays the full code in the chat response
  • You can copy the code, modify it, and ask the AI to re-run your version

SQL execution

The AI also runs SQL queries using DuckDB:
SQL queries can target both spreadsheet data (via DuckDB) and connected databases.

MCP execution

The execute_mcp tool lets the AI call external tools through the Model Context Protocol. This extends capabilities to:
  • Web scraping via Apify MCP connector
  • Custom APIs through configured MCP servers
  • Third-party tools that support the MCP protocol

Performance notes

  • Python execution runs server-side, not in your browser
  • Large operations are processed asynchronously
  • Results stream back as they’re ready
  • The AI manages memory and execution limits automatically