Add to Claude

Guides · For agents

Fill blank cells in a CSV with a value

Tools: sift_fix_dry_run, sift_fix_apply, sift_fix_undoWorks with Claude Code

Ask your agent to run Sift's blank_to fix on the column with the value you want, such as unknown. It fills blank cells only and never changes a cell that already has a value. In the test bookings file, 3 of 10 channels are blank and get filled; the other 7 stay as they are.

Ask your agent

With Sift connected (setup takes three steps), paste this and swap in your own paths.

Use Sift with /path/to/rules.bookings.json on /path/to/bookings_export.csv. Dry run blank_to on the channel column with the value unknown. Tell me how many cells would be filled, then apply it if I say yes, raising the limit to 30% for this job only.

Filling 3 of 10 rows is 30%, over the usual limit in this rules file: {"guardrails": {"stop_if_share_of_rows_changed_over": 0.2}}. So the dry run warns that Sift would stop. Asking for 30% for this job only (maxShareChanged) lets it through and leaves the rules file as it is. On a big file with few blanks, the usual limit is often enough.

What Sift sends back

Blank cells that would be filled3 of 10 (30%)
Cells with a value7, left exactly as they were
Flagged0
After applyA new file, a receipt and a changes-only file. The receipt notes that only blank cells were filled.
After undoThe original rebuilt, matching byte for byte

A cell holding only spaces counts as blank. A value with a comma, such as "unknown, check", is quoted in the file so the columns stay in line.

Fill only some of the blanks

To fill a blank only on certain rows, use set_if with a condition instead. In the same file, a blank channel on a pending booking picks out 2 rows. See change a value where a condition is true.

What to do next

Questions

Will it overwrite cells that already have a value?
No. blank_to only writes into blank cells. In the test file, the 7 channels with a value are untouched.
Can I fill blanks on some rows only?
Yes, with set_if: give the value and a condition such as channel is blank and status is pending.
Does it work on an Excel file?
Fixes work on CSV, which is what makes the undo exact. Save the sheet as CSV first, then point your agent at the CSV.

One file, no agent? Clean a file by hand in your browser, with nothing uploaded.

More guides

Guide Change a column's value where a condition is true Guide Find and replace many values at once with a lookup table Guide Write a rules file