Data exploration with AI: throwaway code is your friend - Datatoy
Datatoy Logo
🇬🇧 vibecodingCursordata

Data exploration with AI: throwaway code is your friend

October 17, 2025

Data exploration with AI: throwaway code is your friend

Lessons learned 2/11 after 15 years in software and 1 year of intensive Cursor use

One discipline where your code assistant excels is data exploration. You know, those data loading scripts you've coded hundreds of times, always slightly different, not worth storing or reusing.

The good news is that there are millions of them on the internet, so AIs know them very well.

Prompts that work

Data assembly

"Write a typed Python 3.9 script to read CSV files from this folder, get the column structure for each, and assemble the data into a single CSV file with all columns and data. Leave cells empty where you don't have data."

Extracting images from JSON

"Write a script that loads .json files from this folder. Some keys contain image URLs — find them and add a procedure to download those images with a filename corresponding to the JSON key path."

Testing a new framework

"OpenCV is used in this project. Adapt the project to use Pillow instead. There should be no trace of OpenCV when it's done."

Video processing

"Write a Python script to extract frames from this video [...] into folder [...] between timestamps 21s and 121s and resize them to 480x230 ignoring the original ratio. The OpenCV module is already installed."

Moreover, most of these scripts work on the first try with recent AIs (Gemini 2.5 Pro, Claude 4, etc.).

The heavy side: AI generates too much

By default, generative AI generates... You'll often find that a simple request results in a new bash script, a test file, a .md, etc. on top of what you wanted.

For exploration, it doesn't matter — these scripts have little value given how easily they can be remade. But you'll need to be ready to clean up after every AI intervention to keep only what truly matters.

Or set this up from the start in your Cursor rules files:

"Don't add features or files I haven't explicitly asked for. You can suggest them if it's important."

"Use simple and elegant solutions to have as little code as possible."

Summary

  • Exploration with AI is a joy — data, tech, frameworks
  • The code is THROWAWAY — only keep what's strictly necessary in the repo (git is your friend)
  • Clean up continuously

Originally published on LinkedIn.