Analyze sensitive customer data by coding against a synthetic twin

A data analyst had Claude Code in the cloud build an analysis notebook and dashboard from a 100-row synthetic copy of hotel guest data, then ran that code locally on the real file.

Done withClaude Code· Nov 5, 2026

What they did

Thu Vu, a data analyst and YouTuber, wanted AI help on a table of 2,000 hotel guest records with emails, billing addresses and card numbers, without the real rows ever leaving the laptop. Vu first used the Synthetic Data Vault Python library locally to learn the table's patterns and sample a 100-row fake version with the same columns and types. Vu then opened Claude Code in cloud mode, so it had no access to local files, attached only the fake CSV, and asked for a Jupyter notebook using pandas and Plotly that answers three questions: typical length of stay, most common email domains, and how many guests are households versus corporate accounts. The prompt also asked for comments on data gotchas and a live dashboard. The guest data in the demo is itself made up.

How it went

Claude Code wrote and tested the notebook against the synthetic file, including data quality checks, length-of-stay buckets, an email domain breakdown and the household versus corporate split, and built a preview dashboard. When the downloaded notebook ran locally, Plotly failed on a missing nbformat package, so a second prompt got a requirements.txt. After swapping the file path to the full dataset, the notebook ran locally. The code, both prompts and the synthetic data workflow are published in a repo alongside a video.

Worth knowing

The point is that the agent only needs the shape of the data to write the code, not the data itself. Synthetic generation can misread columns: SDV detected the billing address column as an id and it had to be corrected by hand. The author also advises dropping columns you do not need, such as card numbers, before uploading even the fake copy.

Try it

With Claude Code· 6 parts to fill in

I have attached [a small synthetic copy of my dataset] that has the same columns and types as my real data, but none of the real values. Write a Jupyter notebook using [pandas and Plotly] that answers these questions: [question 1], [question 2], [question 3]. Run and test every cell against the attached file, comment each step, and flag data problems such as missing or invalid values. Keep the data path in one variable at the top so I can point it at [the real file] on my own machine. Also give me a requirements.txt with every package the notebook needs. Stop when the notebook runs cleanly end to end and show me a summary of the findings.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related