Display the most occuring categorical element in the column

For a dataset's column of categorical values, how to display the most occuring element in the column?

2 comentarios

A short example
Like I had the data of number of animals in a huge pet shop. possible, there could be more than one bvariety of dogs, those are still all dogs and so a column naems 'animal name' might contain several animals names repeatedly - say 7 types of dogs and 5 types of cat.
Now, I wish to find which animal I have the maximum variety of. Then I shall use this column to find out the same.

Iniciar sesión para comentar.

 Respuesta aceptada

Sachin Motwani
Sachin Motwani el 22 de Sept. de 2020
Got my answer.
It's the 'mode' function simply.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Productos

Versión

R2020a

Etiquetas

Preguntada:

el 22 de Sept. de 2020

Comentada:

el 22 de Sept. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by