1---1---
2name: Analyze datasets and ship reports2name: Analyze datasets and ship reports
3tagline: Turn messy data into clear analysis and visualizations.3tagline: Turn messy data into clear analysis and visualizations.
4summary: Use Codex to clean data, join sources, explore hypotheses, model4summary: Use ChatGPT Work to clean data, join sources, explore a question, model
5 results, and package the output as a reusable artifact.5 the result, and produce a clear report with supporting charts and caveats.
6skills:6skills:
7 - token: $spreadsheet7 - token: $spreadsheets
8 description: Inspect CSV, TSV, and Excel files when formulas, exports, or quick8 description: Inspect CSV, TSV, and Excel files, check formulas and joins, and
9 spreadsheet checks matter.9 create reviewable tables or charts.
10 - token: $jupyter-notebook10 - token: google-drive
11 url: https://github.com/openai/skills/tree/main/skills/.curated/jupyter-notebook11 url: https://github.com/openai/plugins/tree/main/plugins/google-drive
12 description: Create or refactor notebooks for exploratory analysis, experiments,12 description: Read the approved Google Sheets and source files you name in Drive.
13 and reusable walkthroughs.13 - token: Data Analytics
14 - token: $doc14 description: Gather source context, analyze and validate data, and build
15 url: https://github.com/openai/skills/tree/main/skills/.curated/doc15 reusable reports, dashboards, charts, or notebooks.
16 description: Produce stakeholder-ready `.docx` reports when layout, tables, or
17 comments matter.
18 - token: $pdf
19 url: https://github.com/openai/skills/tree/main/skills/.curated/pdf
20 description: Render PDF outputs and check the final analysis artifact before you
21 share it.
22bestFor:16bestFor:
23 - Data analysis that starts with messy files and should end with a chart,17 - Data analysis that starts with messy files and ends with a chart, memo,
24 memo, dashboard, or report18 dashboard, or report.
25 - Analysts who want Codex to help with cleanup, joins, exploratory analysis,19 - Questions that require cleaning, reliable joins, interpretable models, or
26 and reproducible scripts20 reproducible analysis.
27 - Teams that need reviewable artifacts instead of one-off notebook state21 - Teams that need artifacts others can review and reuse.
28starterPrompt:22starterPrompt:
29 title: Turn the Dataset Into a Reproducible Analysis23 title: Turn data into a source-backed report
30 body: >-24 body: >-
31 I'm doing a data analysis project in this workspace.25 Use @Data Analytics to inspect the attached property-sales and
26 highway-distance datasets and determine whether homes near the highway have
27 lower property values.
32 28
33 29
34 Goal:30 Explain what each source contains, identify the relevant columns and likely
31 join keys, and check for missing values, duplicates, unmatched records, and
32 incomplete data. Clean and join the inputs without overwriting the source
33 files or inventing values.
35 34
36 - Figure out whether houses near the highway have lower property valuations.
37 35
38 36 Explore the question with clear supporting charts, start with an
39 Start by:37 interpretable model when modeling is useful, and explain the result,
40 38 assumptions, and uncertainty in plain language. Return a concise report,
41 - reading `AGENTS.md` and explaining the recommended Python environment39 notebook, or spreadsheet with the answer first, name the files you create,
42 40 and flag any data issue that could change the conclusion.
43 - loading the dataset(s) at [dataset path]41 suggestedEffort: medium
44
45 - describing what each file contains, likely join keys, and obvious data
46 quality issues
47
48 - proposing a reproducible workflow from import and tidy through
49 visualization, modeling, and report output
50
51
52 Constraints:
53
54 - prefer scripts and saved artifacts over one-off notebook state
55
56 - do not invent missing values or merge keys
57
58 - suggest any skills or worktree splits that would make the workflow more
59 reproducible
60
61
62 Output:
63
64 - setup plan
65
66 - data inventory
67
68 - analysis plan
69
70 - first commands or files to create
71relatedLinks:42relatedLinks:
43 - label: Plugins
44 url: /codex/plugins
72 - label: Agent skills45 - label: Agent skills
73 url: /codex/build-skills46 url: /codex/build-skills
74 - label: Worktrees in the ChatGPT desktop app
75 url: /codex/environments/git-worktrees
76techStack:47techStack:
77 - need: Analysis stack48 - need: Analysis stack
78 goodDefault: "[pandas](https://pandas.pydata.org/) with49 goodDefault: "[pandas](https://pandas.pydata.org/) with
87 models.58 models.
88---59---
89 60
61> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.
62
90## Introduction63## Introduction
91 64
92At its core, data analysis is about using data to inform decisions. The goal isn't analysis for its own sake. It's to produce an artifact that helps someone act: a chart for leadership, an experiment readout for a product team, a model evaluation for researchers, or a dashboard that guides daily operations.65At its core, data analysis is about using data to inform decisions. The goal isn't analysis for its own sake. It's to produce an artifact that helps someone act: a chart for leadership, an experiment readout for a product team, a model evaluation for researchers, or a dashboard that guides daily operations.
93 66
94A useful framework, popularized by _R for Data Science_, is a loop: import and tidy data, then iterate between transform, visualize, and model to build understanding before you communicate results. Programming surrounds that whole cycle.67A useful framework, popularized by _R for Data Science_, is a loop: import and tidy data, then iterate between transform, visualize, and model to build understanding before you communicate results.
95 68
96Codex fits well into this workflow. It helps you move around the loop faster by cleaning data, exploring hypotheses, generating analyses, and producing reproducible artifacts. The target isn't a one-off notebook. The target is a workflow that other people can review, trust, and rerun.69ChatGPT Work fits well into this workflow. It helps you clean data, explore hypotheses, generate analyses, and produce reproducible artifacts. The target isn't a one-off notebook. It's an analysis that other people can review, trust, and rerun.
97 70
98## Define your use case71## Define your use case
99 72
100Choose one concrete question you want to answer with your data.73Choose one concrete question you want to answer with your data. The more specific the question, the easier it is to identify the right inputs, checks, and result.
101
102The more specific the question, the better. It will help Codex understand what you want to achieve and how to help you get there.
103 74
104### Running example: Property values near the highway75### Running example: Property values near the highway
105 76
109 80
110Suppose one dataset contains property values or sale prices, and another contains location, parcel, or highway-proximity information. The work isn't only to run a model. It's to make the inputs trustworthy, document the joins, pressure-test the result, and end with an artifact that somebody else can use.81Suppose one dataset contains property values or sale prices, and another contains location, parcel, or highway-proximity information. The work isn't only to run a model. It's to make the inputs trustworthy, document the joins, pressure-test the result, and end with an artifact that somebody else can use.
111 82
112## Set up the environment83You can attach CSVs or Excel workbooks, name an approved Google Sheet with `@google-drive`, or use the desktop app when your data is stored on your computer.
113
114When you start a new data analysis project, you need to set up the environment and define the rules of the project.
115
116- **Environment:** Codex should know which Python environment, package manager, folders, and output conventions are canonical for the project.
117- **Skills:** Repeated workflows such as notebook cleanup, spreadsheet exports, or final report packaging should move into reusable skills instead of being re-explained in every prompt.
118- **Worktrees:** Separate explorations into separate worktrees so one hypothesis, merge strategy, or visualization branch doesn't bleed into another.
119 84
120To learn more about how to install and use skills, see our [skills documentation](https://developers.openai.com/codex/build-skills).85### Example result
121 86
122### Guide Codex's behavior87In a fictional sample, ChatGPT matches 11 property sales to the highway-distance file and flags one sale without a matching distance. Homes within one mile of the highway average **$500,000**, compared with **$600,000** for homes two to five miles away.
123 88
124Before touching the data, tell Codex how to behave in the repo. Put personal defaults in `~/.codex/AGENTS.md`, and put project rules in the repository `AGENTS.md`.89After excluding the highest-priced distant property, the difference remains **$94,000**. The report and chart explain that the sample is small, the unmatched sale is excluded, and the comparison doesn't establish causation or control for neighborhood, sale timing, traffic, or noise.
125 90
126A small `AGENTS.md` is often enough:
127 91
128```md
129## Data analysis defaults
130
131- Use `uv run` or the project's existing Python environment.
132- Keep source data in `data/raw/` and write cleaned data to `data/processed/`.
133- Put exploratory notebooks in `analysis/` and final artifacts in `output/`.
134- Never overwrite raw files.
135- Prefer scripts or checked-in notebooks over unnamed scratch cells.
136- Before merging datasets, report candidate keys, null rates, and join coverage.
137```
138 92
139If the repo doesn't already define a Python environment, ask Codex to create a reproducible setup and explain how to run it. For data analysis work, that step matters more than jumping straight into charts.
140 93
141## Import the data94## Import the data
142 95
143Often the fastest way to start is to paste the file path and ask Codex to inspect it. This is where Codex helps you answer basic but important questions:96Start by attaching the files and asking ChatGPT to inspect them. This helps answer basic but important questions:
144 97
145- What file formats are here?98- What file formats are here?
146- What does each dataset seem to represent?99- What does each dataset seem to represent?
153 106
154Most real work starts here. You have two or more datasets, the primary key isn't clear, and a naive merge could lose data or create duplicates.107Most real work starts here. You have two or more datasets, the primary key isn't clear, and a naive merge could lose data or create duplicates.
155 108
156Ask Codex to profile the merge before performing it:109Ask ChatGPT to profile the merge before performing it:
157 110
158- Check uniqueness for candidate keys.111- Check uniqueness for candidate keys.
159- Measure null rates and formatting differences.112- Measure null rates and formatting differences.
161- Run trial joins and report match rates.114- Run trial joins and report match rates.
162- Recommend the safest merge strategy before it writes the final merged file.115- Recommend the safest merge strategy before it writes the final merged file.
163 116
164If you need to derive the best key, such as a normalized address, a parcel identifier built from a few columns, or a location join, make Codex explain the tradeoffs and edge cases before you accept the merge.117If you need to derive the best key, such as a normalized address, a parcel identifier built from a few columns, or a location join, ask ChatGPT to explain the tradeoffs and edge cases before you accept the merge.
165 118
166## Explore with charts and separate worktrees119## Explore with charts
167 120
168Exploratory data analysis is where Codex benefits from clean isolation. One worktree can test address cleanup or feature engineering while another focuses on charts or alternate model directions. That keeps each diff reviewable and prevents one long chat from mixing incompatible ideas.121Use charts to understand the data before choosing a model. In the running example, compare homes near the highway with homes farther away, examine outliers, inspect missing-value patterns, and check whether the apparent effect reflects neighborhood composition, home size, or another factor.
169 122
170The ChatGPT desktop app includes built-in worktree support. If you are working in a terminal, plain Git worktrees work well too:123Keep each chart tied to the original question. Save the useful comparisons so another person can inspect the analysis.
171
172```bash
173git worktree add ../analysis-highway-eda -b analysis/highway-eda
174git worktree add ../analysis-model-comparison -b analysis/highway-modeling
175```
176
177In the running example, this step is where you would compare homes near the highway against homes farther away, examine outliers, inspect missing-value patterns, and decide whether the observed effect looks real or reflects neighborhood composition, home size, or other factors.
178 124
179## Model the question125## Model the question
180 126
182 128
183For the highway question, a sensible first pass is a regression or other transparent model that estimates the relationship between highway proximity and property value while controlling for relevant factors such as size, age, and location.129For the highway question, a sensible first pass is a regression or other transparent model that estimates the relationship between highway proximity and property value while controlling for relevant factors such as size, age, and location.
184 130
185Ask Codex to be explicit about:131Ask ChatGPT to be explicit about:
186 132
187- The target variable and feature definitions.133- The target variable and feature definitions.
188- Which controls to include and why.134- Which controls to include and why.
194 140
195## Communicate the result141## Communicate the result
196 142
197The analysis is only useful when someone else can consume it. Ask Codex to produce the artifact the audience needs:143The analysis is only useful when someone else can consume it. Ask ChatGPT to produce the artifact the audience needs:
198 144
199- A Markdown memo for technical collaborators.145- A Markdown memo for technical collaborators.
200- A spreadsheet or CSV for downstream operations work.146- A spreadsheet or CSV for downstream operations.
201- A `.docx` brief using `$doc` when formatting and tables matter.147- A formatted document or PDF for decision-makers.
202- A rendered appendix or final deliverable using `$pdf`.148- A notebook, dashboard, or static report for a reusable analysis.
203- A lightweight dashboard or static report site deployed with `$vercel-deploy`.
204 149
205This is also where you ask for caveats. If the join quality is imperfect, sampling bias is present, or the model assumptions are fragile, Codex should say that plainly in the deliverable.150Ask it to include caveats. If the join quality is imperfect, sampling bias is present, or model assumptions are fragile, the deliverable should say so plainly.
206 151
207## Skills to consider152## Optional: set up a Python environment
208 153
209The curated skills that fit this workflow especially well are:154If the project needs reusable scripts or a notebook, ask ChatGPT to use the existing Python environment or set up a small, reproducible one. Keep source files unchanged and save the analysis, charts, and final report separately. You don't need to set up Python before analyzing attached files in ChatGPT Work.
210 155
211- `$spreadsheet` for CSV, TSV, and Excel editing or exports.156## Suggested prompts
212- `$jupyter-notebook` when the deliverable should stay notebook-native.
213- `$doc` and `$pdf` for stakeholder-facing outputs.
214- `$vercel-deploy` when you want to share the result as a URL.
215 157
216Once the workflow stabilizes, create repo-local skills for the repeated parts, such as `refresh-data`, `merge-and-qa`, or `publish-weekly-report`. That's a better long-term pattern than pasting the same procedural prompt into every chat.158**Load the datasets and explain them**
217 159
218## Suggested prompts
219 160
220**Set Up the Analysis Environment**
221 161
222**Load the Dataset and Explain It**162**Prompt:**
223 163
224**Profile the Merge Before You Join**164```text
165Review the data files I've attached and explain what each one contains. Identify likely target columns, dates, parcel or location identifiers, file formats, missing information, and obvious quality issues. Don't draw conclusions yet.
166```
225 167
226**Open a Fresh Exploration Worktree**168**Check the merge before joining**
169
170
171
172**Prompt:**
173
174```text
175Check how these datasets should be joined. Profile the candidate keys, show duplicate and unmatched records, normalize obvious formatting issues, and explain the safest join. Don't invent missing values or overwrite the source files.
176```
227 177
228**Build an Interpretable First Model**178**Build an interpretable first model**
229 179
230**Package the Results for Stakeholders**180
181
182**Prompt:**
183
184```text
185Model whether highway proximity is associated with lower property values. Start with an interpretable baseline, account for home size, age, and neighborhood where the data supports it, and explain the effect, uncertainty, and limitations in plain language.
186```
187
188**Package the results for stakeholders**
189
190
191
192**Prompt:**
193
194```text
195Turn this analysis into a short, stakeholder-ready report. Put the answer first, include the most useful supporting charts, explain the data and join checks, and clearly flag any limitations or uncertainty. Keep the source data unchanged and name the files you create.
196```