I am beginner in python and
I need to get the most common value of that column using code
I have next table from csv file:
How I can get most common (common means that the count of y is 3, count of n is 2 , so common is y) ‘value’?
You can use
count_values() and extract it from the result
df.value.value_counts(sort=True).index # 'y'
Just be careful what should happen if there are multiple ‘most common’ values.