Urgent.News

What's breaking now, across thousands of outlets.

Tech

Find the Rework Loops: Counting Repeat Edits per Record in an Exported Sheet With Python

When a small team says "this process is slow", the cause is often not speed. It is rework: the same order, quote or ticket gets touched again and again because a rule is unclear. You can measure that before you spend anything on AI. It is one of the most useful numbers when you audit a business workflow ahead of an AI purchase , and you only need an exported change log. The input Most tools can…

When a small team finds a process slow, the issue is often not speed but rework. The same order, quote or ticket may be touched repeatedly due to unclear rules. This can be measured before investing in AI, using an exported change log. Most tools can export an activity or change history, which can be shaped into a CSV format with columns like record_id, changed_at, changed_by, field.

Using Python, you can read this CSV file and create a script to count the number of repeat edits per record. The script imports necessary libraries such as csv, defaultdict, datetime, and creates a dictionary to store edits for each record_id. The script then opens the changes.csv file and reads each row using csv.DictReader. It converts the changed_at timestamp to a datetime object and appends a tuple of (timestamp, changed_by, field) to the list of edits for the corresponding record_id in the defaultdict.

After processing all the rows, the script creates a report list to store the results. For each record_id, it sorts the edits, creates a defaultdict to count the number of times each field was edited, and a set to store the unique people who changed the record. It then identifies the repeated fields by checking the count in the fields dictionary. If there are repeated fields, it appends a tuple containing the record_id, total number of edits, number of unique people, and the repeated fields to the report list.

Finally, the script sorts the report list based on the total edits in descending order and prints the top 20 records with their respective details, such as record_id, total edits, number of people involved, and the repeated fields. The output helps in identifying the records with high rework frequency, which can be a key factor in improving the workflow before considering the use of AI.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Eighteen Enclosures, Before And After

Eighteen domains, each with its first measured point and its last; the worst started at a quarter, one stays under a hundred. 👋 Hi, I'm Anton - a software engineer.

  • Eighteen domains tracked with acceptance numbers
  • Only one domain under 100% at start: gathering on emulator
  • Pickle guinea pig tracks progress with colorful tags

I Built Homelab Architect — Plan Your Stack Before You Build It

Most homelab beginners make the same mistake: they grab a Docker Compose template, paste it in, and then discover three months later that their "simple setup" is a sprawling mess of undocumented…

  • Homelab Architect tool analyzes docker-compose.yml or builds stack manually.
  • Generates resource dashboard, service cards, security audit, and more.
  • Works entirely in browser, no data sent, functions offline after load.

You Never Know

Grad-school work on worst-case execution time — and how the same method jumped to energy, then got dwarfed by scale. You never know. A look back — long before any of the tools we argue about now.

  • Master's degree focused on Worst Case Execution Time (WCET) analysis
  • Developed improved prediction methods for energy consumption reduction
  • Anticipating future technological advancements is uncertain

More from Saturday 14 November →