Finding the most common values from given data
Posted
by Ben Shelock
on Stack Overflow
See other posts from Stack Overflow
or by Ben Shelock
Published on 2010-04-01T21:57:03Z
Indexed on
2010/04/01
22:03 UTC
Read the original article
Hit count: 299
I have some data that looks something like this...
+----------+----------+----------+
| Column 1 | Column 2 | Column 3 |
+----------+----------+----------+
| Red | Blue | Green |
| Yellow | Blue | Pink |
| Black | Grey | Blue |
+--------------------------------+
I need to go through this data and find the 3 most common colours.
The raw data is in CSV and there's likely to be thousands more rows. (link)
What's the best way of doing this?
© Stack Overflow or respective owner