Menu

Find Your Top Repeat Questions with 20 Lines of Python
📰

Find Your Top Repeat Questions with 20 Lines of Python

DEV Community: beginners·AI Automation Enterenpeur·about 5 hours ago
#Xm1OFvIU
#devtobeginners#devto#dev#script#started
Long article (588 words) — no AI summary yet.
Reading 0:00
15s threshold

If you run a product, a course, or a community, you probably answer the same questions over and over. Each reply is small, but together they eat hours.

I use a simple rule: when a question shows up 3 times, it stops being a DM and becomes a public post, pinned in the community and shared as a link from then on.

The hard part is knowing which questions repeat. Your memory is biased toward the most recent ones. So let's let a script count them.

The input

Export your messages (or paste them in) to a CSV called dms.csv with a single column named message:

message How do I get started? how do i get started?? Is there a replay of the call? Which tool do you use for email? Is there a replay?

Enter fullscreen mode

Exit fullscreen mode

Most platforms let you export messages, or you can copy the last month by hand. Twenty to fifty rows is enough to see patterns.

The script

import csv import re from collections import Counter

def normalize ( text ) : text = text . lower ( ) text = re .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.