Export Data Cleaning Steps as SQL, pandas or PySpark Code

Clean or join a CSV in your browser, then export the steps as DuckDB SQL, pandas, PySpark or a dbt model. Free and private.

Quick answer: Join files on a key, trim, concatenate, fix dates, filter and more, in the order you choose.

Related: Data Transformation: Join, Trim, Concatenate · Delete Columns from a CSV File · Reorder Columns in a CSV File · Remove Empty Rows and Columns from CSV · Export Data Transformations as SQL, pandas and PySpark

How to use the Export Data Cleaning Steps as SQL, pandas or PySpark Code

Join files on a key, trim, concatenate, fix dates, filter and more, in the order you choose.

Data Transformation lets you reshape a file with a list of steps instead of formulas. Join two files on a key with an inner, left, right or full join, trim spaces, concatenate or split columns, change date formats, change case, find and replace, filter, sort, remove duplicates and fill empty cells. Add a calculated column, round numbers, extract numbers, emails or URLs from text, pad IDs with leading zeros, clean text, and group and summarize rows with count, sum, average, min or max. Export the whole recipe as runnable DuckDB SQL, pandas, PySpark or a dbt model. See the result straight away, then download it or send it to another tool. Every step is recorded in Data Lineage.

  1. Load a file (and a second one to join)
  2. Add the transformations you want
  3. Check the result and download

Tips

Example

Input: steps: trim, filter, group by

Output: SELECT city, sum(total) FROM ... GROUP BY city

Browse by topic

Who uses Data Utility

Frequently asked questions · Data format benchmark

Frequently asked questions

Which languages can I export?

DuckDB SQL, Python with pandas, PySpark and a dbt model.

Is the exported code tested?

The DuckDB SQL is checked against the real DuckDB engine for every step. Run the pandas and PySpark code on a small sample first.

Can I join two files or combine columns?

Yes. Data Transformation lets you join two CSV or Excel files on a key (inner, left, right or full), and trim spaces, concatenate columns, change case, find and replace, split, rename, filter, sort, remove duplicates and fill empty cells. You choose the steps, check the result and download it. Your files stay in your browser.

Which transformations are available?

Join with a second file (inner, left, right or full), trim spaces, concatenate columns, change date formats, change text case, find and replace, split a column, rename or remove columns, filter rows, remove duplicates, sort, fill empty cells, add a calculated column, round numbers, extract part of text (numbers, emails, URLs or a pattern), pad IDs with zeros, clean text (accents, hidden characters), group and summarize (count, sum, average, min, max) and keep the first or last rows. Steps run from top to bottom and you can reorder them. Export the recipe as DuckDB SQL, pandas, PySpark or dbt code.

Can I export my transformations as code?

Yes. After you add and fill in your steps, open Export recipe as code under the result. Choose DuckDB SQL, Python (pandas), PySpark or a dbt model, then copy or download the code. It is a readable starting point: run it on a small sample first and adapt it for your own pipeline. The DuckDB SQL is checked against the real DuckDB engine for every step.

Can I change the date format of a column?

Yes. Add a Change date format step, pick the column and the new format, such as 2026-03-09, 09/03/2026 or March 9, 2026. It reads many layouts, Excel date numbers and unix timestamps, and can also give only the year, month, weekday or quarter. If 03/04/2026 is unclear, you choose day first or month first.

Is Data Transformation a VLOOKUP alternative?

For lookups between two files, yes. A join adds the matching columns from the second file to every row of the first, with no formulas. Keys are matched ignoring case and extra spaces.

Related pages

Topic guides

Guides