How to Transform Data with AI Using Natural Language
You can transform data with AI by describing the change in plain English, such as "drop rows where country is empty and add a total column equal to price times quantity", and letting the AI translate it into concrete steps you review before they run. TensorTurn's AI data editor plans those steps from a whitelisted vocabulary of operations, applies them in your browser after you approve them, and only shows the AI the column profile and a tiny sample rather than your rows.
What natural language data transformation means
Data wrangling has always required either spreadsheet formulas or code: pandas, SQL, R or Power Query's M language. Natural language transformation puts a translation layer in front of that work. You state the intent, the AI works out which columns and operations it involves, and you get a plan you can read. The value is not only speed. It also makes cleaning accessible to analysts, operations staff and domain experts who know what the data should look like but do not write code.
How it works in TensorTurn
- Upload a CSV, TSV, JSON, Parquet or Excel file. The column profile is computed in your browser.
- Open the AI data editor, a spreadsheet grid of your data, and type an instruction.
- The AI receives the column profile and a tiny sample, not the full table, and plans one or more steps.
- Each step comes from a fixed, whitelisted set of operations and is shown in plain language.
- You review the plan, approve it, and the steps are applied to the data in your browser.
- You can keep instructing, edit cells manually, or use one-click auto-fix for common issues.
Example instructions and the steps they produce
| Plain-English instruction | Planned operation(s) |
|---|---|
| "Rename cust_nm to customer_name" | Rename column |
| "Get rid of the internal_notes column" | Delete column |
| "Add a column called source with the value 2026 export" | Add constant column |
| "Add total = price * quantity" | Add formula column |
| "Mark orders over 500 as large, otherwise small" | Add conditional column |
| "Turn Y and N into Yes and No in the subscribed column" | Map values |
| "Remove test accounts where email ends with @example.com" | Delete rows where (filter) |
| "Clean up spacing and make city names title case" | Trim whitespace, normalize case (title) |
| "Fill missing age with the median and drop rows with no email" | Fill missing (median), drop rows with missing values |
| "Replace n/a with blank in revenue and make it numeric" | Find and replace values, cast to number |
| "Round discount to 2 decimals and remove extreme outliers in amount" | Round, remove outlier rows |
| "Remove duplicates and sort by signup date, newest first" | Drop duplicates, sort rows |
Why a whitelist beats letting an LLM run arbitrary code
A common way to build an "AI data analyst" is to let a language model write Python or SQL and execute it. That is powerful, but it has real costs when the data matters.
- Reviewability: a list like "trim whitespace on city, then drop duplicates" can be checked by anyone. A 40-line generated script usually cannot, so people approve it without reading it.
- Predictability: whitelisted operations behave the same way every time. Generated code can pick a different approach on each request, including subtle errors such as filling missing values with the wrong statistic.
- Safety: arbitrary code can do anything the runtime allows, including deleting files or sending data elsewhere. A fixed vocabulary of table operations cannot.
- Privacy: because the AI only plans steps, it needs the column profile and a small sample, not the full dataset. Code-executing assistants often need the data itself.
- No hallucinated APIs: the model cannot invent a function that does not exist, because it can only choose from operations that do.
The trade-off is reach. A whitelist cannot do everything a general programming language can. TensorTurn keeps general Python for where it belongs: model training, where the generated notebook is visible, editable cell by cell, and runs on isolated cloud GPUs or your own machine.
Writing instructions that work well
- Name columns exactly as they appear, or describe them unambiguously ("the date column", when there is only one).
- Give the rule, not just the goal: "fill missing income with the median" is better than "fix income".
- Chain related steps in one instruction when order matters: "trim and lowercase email, then drop duplicates".
- State thresholds explicitly for filters: "delete rows where quantity is less than 0".
- Read the plan before approving it, especially for row deletions.
What it is not for
The data editor transforms one table at a time. To combine tables, use TensorTurn's dataset merge, which discovers join keys and matches schemas. Reshaping operations such as pivots, and custom feature logic beyond formula and conditional columns, are better done in the generated training notebook or in pandas. For scheduled, recurring pipelines or dashboards, dedicated ETL and BI tools are the right choice.
Compared with other approaches
pandas and SQL give full control and are the right choice for engineers building production pipelines. General AI coding assistants can write that code for you, but you still need to read and run it. Power Query offers recorded steps for Excel users. TensorTurn's approach sits in between: plain-English input, readable whitelisted steps, review before anything changes, and the rows kept in your browser.
Frequently asked questions
Can AI clean and transform my data automatically?
Yes, with review. In TensorTurn you describe the change in plain English, the AI plans steps from a whitelisted set of operations, and you approve them before they run. One-click auto-fix also handles common issues such as formatted numbers.
Does the AI see my whole dataset?
No. TensorTurn's AI data editor sends the column profile and a tiny sample so the model understands the structure. The rows stay in your browser, where the approved steps are applied.
What operations can the AI data editor perform?
Rename and delete columns, add constant, formula and conditional columns, map values, delete rows matching a condition, drop duplicates, drop rows with missing values, fill missing values, trim whitespace, normalize case, find and replace, cast to number, round, remove outlier rows and sort rows.
Why not just let ChatGPT write pandas code?
You can, and it is a good option if you read Python. The downside is that generated code is harder to review, can vary between requests, and usually needs the data itself to run. A whitelisted plan is easier to check and keeps the rows local.
What is AI data wrangling?
AI data wrangling means using a language model to turn plain-English requests into data cleaning and reshaping steps, so people can prepare data without writing formulas or code.