find and select the most frequent data of column in pandas DataFrame

后端 未结 3 728
别跟我提以往
别跟我提以往 2021-01-12 09:33

I have a dataframe with the following column:

file[\'DirViento\']

Fecha
2011-01-01    ENE
2011-01-02    ENE
2011-01-03    ENE
2011-01-04    NNE 
2011-01-05          


        
3条回答
  •  不知归路
    2021-01-12 09:59

    Pandas 0.15.2 has a DataFrame.mode() method. It might be of use to someone looking for this as I was.

    Here are the docs.

    Edit: For the Value:

    DataFrame.mode()[0]
    

提交回复
热议问题