How to sort out duplicates?
How do I search for unique values? I have a list of duplicates and want only the unique values from this list as well as a count of the resulting filter.
thank you. Perhaps better to do in Excel then.
If you’re working with just a list of values, you can install the CsvQuery plugin and run a SQL type query on your list. Say you have this as your list:
Open the CsvQuery window, (you may have to hit the “read file” button), type this into the command bar:
SELECT col1, COUNT(*) FROM THIS GROUP BY COL1 ORDER BY COL1
the output window will show this:
If you want case insensitive searches:
SELECT col1, COUNT(*) FROM THIS GROUP BY COL1 COLLATE NOCASE ORDER BY col1 COLLATE NOCASE
That will get you this:
I had to use ctrl-c to copy the output. Right click - copy didn’t work for me. Note that in a CsvQuery query “this” is the table name (your list in the active window).
Reading a file with 100k lines and executing the search each took about a second on my test case (the sample above repeated a lot). IDK if you can make a macro out of this, but it’s another option besides regex and python.
May the Sort be with you.