Use Codex as a data analyst

By | June 10, 2026
In this demo, Codex analyzes the data, explains what changed and why it matters, and packages the answer into a report your team can use.
More than 5 million people now use Codex every week, with data analysts, marketers, operators, designers, researchers, investors, and bankers among the fastest-growing users.
Use Codex as a data analyst
To use OpenAI Codex as an AI data analyst, connect it to your local file system or connect data sources like Databricks using MCPs Model Context Protocol. Ask it to profile, tidy, clean, and visualize data without manually writing SQL or Python yourself. [1, 2, 3]
1. Set Up Your Environment
Before running an analysis, you need to provide Codex with context so it understands where your data lives and what you need to achieve. [1]
  • Local Files: Codex runs locally, meaning it reads files directly from your desktop. Open a project in the desktop app and link it to the local folder containing your CSV files and data dictionaries. [1, 2, 3]
  • External Databases: Use plugins or MCPs to connect to live tools, such as the Excel Composio Excel Toolkit or databases, so you don’t have to upload data manually to an external browser window. [1, 2, 3, 4, 5]
2. Prepare and Import Data
Ask Codex to examine your datasets, merge sources, and resolve quality issues. [1]
  • Codex can profile the merge before writing the final file by checking unique candidate keys, measuring null rates, and normalizing formatting.
  • It will automate cleaning tasks like standardizing casing, trimming whitespace, and replacing null or zero values. [1, 2]
3. Build Interactive Reports and Visualizations
Instead of stopping at simple code queries, you can ask Codex to assemble review-ready analysis assets. [1]
  • Use Codex to diagnose business issues (e.g., why retention dropped or why booking cancellations spiked) and let it run cohort or retention analysis.
  • Have it format the output into interactive HTML reports, Jupyter Notebooks, or even publishable Markdown summaries.
  • [1, 2, 3, 4, 5]
4. Apply Analytical Judgment and Validate
While Codex speeds up the workflow from 10 hours to 10 minutes, manual verification is critical: [1, 2]
  • Validate its findings by pressure-testing the assumptions, checking for data leakage, and creating pivot tables manually to cross-reference.
  • Always confirm you have the necessary internal permissions before using company data with AI models. [1, 2, 3]

If you want to start using Codex for data, let me know:
  • What business question or problem are you trying to solve?
  • What format is your data in (e.g., CSV, SQL, Excel)?